MathGroup Archive 2005

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

Search the Archive

Re: Draw a cylider from {x1,y1,z1} to {x2,y2,z2}

  • To: mathgroup at smc.vnet.net
  • Subject: [mg59540] Re: Draw a cylider from {x1,y1,z1} to {x2,y2,z2}
  • From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
  • Date: Fri, 12 Aug 2005 00:07:44 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <ddf5rs$opb$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

myCylinder[{x1_, y1_, z1_}, {x2_, y2_, z2_}, r_] 
:=
ParametricPlot3D[
{r*Cos[phi] + x1*(1 - t) - t*x2, r*Sin[phi] + 
y1*(1 - t) - t*y2,
z1*(1 - t) - t*z2}, {phi, 0, 2Pi}, {t, 0, 1}
]

and
myCylinder[{0, 0, 0}, {2, 2, 5}, 0.1]

Regards

  Jens


<ibmichuco at hotmail.com> schrieb im Newsbeitrag 
news:ddf5rs$opb$1 at smc.vnet.net...
| Hi,
|
| Is there a simple way to draw a cylinder 
connecting 2 vectors? I have
| tried the Mathematica book as well as searched 
Google without any
| result.
| Ideally, it would be nice if I can label the end 
points with the
| coordinations.
|
| Thanks in advance,
|
| ibmichuco
| 



  • Prev by Date: Re: Simple Print question
  • Next by Date: Re: Re: Cylindrical Surface
  • Previous by thread: Re: Simple Print question
  • Next by thread: Broken DSolve + Piecewise forcing function