MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Parametric cylinder plots round in one instance and elliptical in

  • To: mathgroup at smc.vnet.net
  • Subject: [mg101392] Parametric cylinder plots round in one instance and elliptical in
  • From: Bill <WDWNORWALK at aol.com>
  • Date: Sat, 4 Jul 2009 06:44:28 -0400 (EDT)

Ref: Parametric cylinder plots round in one instance and elliptical in another


Hi:

I have the following Mathematica 6.0.1 code:


ParaCyl[ {x1_, y1_, z1_}, {x2_, y2_, z2_}, r_] := ParametricPlot3D[{
   
r*Cos[s] + x1 + t*(x2 - x1),
r*Sin[s] + y1 + t*(y2 - y1),
z1 + t*(z2 - z1)},
   
{s, 0, 2*Pi}, {t, 0, 1}, Mesh -> False, Axes -> True, 
AxesLabel -> {"x", "y", "z"}, 
PlotRange -> {{-10, 10}, {-10, 10}, {-10, 10}}, 
ViewPoint -> {9, 10, 8}]
  
(*I used the following which looks good wrt roundess:*)

ParaCyl[ {0, 0, 0}, {0, 0, 7}, 5]
(*Plot looks good.*)

Show[%, ViewPoint -> Top]
(*Plot looks round, as expected. *)

(*I change the next plot to:*)
ParaCyl[ {2, 3, 4}, {6, 7, 8}, 5]
(*Plot: Cylinder looks elliptical. Expected a round cylinder.*)

Show[%, ViewVector -> {{12, 13, 14}, {7, 8, 9}}]
(*This is a look down the throat of the elliptical looking cylinder.*)


Question: How can I code this to show a round cylinder, regardless of cylinder orientation?



Thanks in advance,

Bill


  • Prev by Date: Re: Is Orange translucent? - What Methods exist?
  • Next by Date: Help with FindRoot
  • Previous by thread: Re: eyeofra_ifs.gif (GIF Image, 1044x1044 pixels) - Scaled (87%)
  • Next by thread: Re: Parametric cylinder plots round in one instance and elliptical in