RE: circular plot question
- To: mathgroup at smc.vnet.net
- Subject: [mg28449] RE: [mg28433] circular plot question
- From: "David Park" <djmp at earthlink.net>
- Date: Thu, 19 Apr 2001 03:26:38 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Julian, There are probably several methods, but I use my DrawingCube package available at my web site for this kind of graphics problem. Here is a sample function. f[r_, \[Theta]_] := (r - r^2)*Cos[\[Theta]] Needs["Graphics`DrawingCube`"] The following draws the 3D surface in the r, theta plane (which is not what you want.) Draw3D is just like Plot3D except that it extracts the primitive graphics in Graphics3D format. That is, it extracts the list of all the polygons that make up the surface. Show[Graphics3D[{Draw3D[f[r, \[Theta]], {r, 0, 2}, {\[Theta], 0, 2*Pi}, PlotPoints -> {15, 31}]}], AspectRatio -> Automatic, PlotRange -> All]; The following converts the cylindrical coordinates in the graphics primitives to Cartesian coordinates and produces the desired circular plot with Cartesian axes. The conversion is done by the DrawingTransform3D package routine. The fact that Draw3D produces the primitive graphics makes it easy to operate on them with routines like DrawingTransform3D. Show[Graphics3D[{Draw3D[f[r, \[Theta]], {r, 0, 2}, {\[Theta], 0, 2*Pi}, PlotPoints -> {15, 31}] /. DrawingTransform3D[ #1*Cos[#2] & , #1*Sin[#2] & , #3 & ]}], AspectRatio -> Automatic, PlotRange -> All]; David Park djmp at earthlink.net http://home.earthlink.net/~djmp/ > From: Julian Sweet [mailto:jsweet at engineering.ucsb.edu] To: mathgroup at smc.vnet.net > How can I go about getting Mathematica to create a 3D plot of > a function with z and phi dependence (cylindrical coordinates) such > that it will show it's cylindrical symmetry. > Right now I am able to make a 3D plot using z and phi, but I > would like it to appear in a circle. > > > Thanks > > > E-mail response preferred: jsweet at engineering.ucsb.edu > >