Re: SphericalPlot3D in Version 6.0
- To: mathgroup at smc.vnet.net
- Subject: [mg79429] Re: [mg79350] SphericalPlot3D in Version 6.0
- From: Brett Champion <brettc at wolfram.com>
- Date: Thu, 26 Jul 2007 05:40:03 -0400 (EDT)
- References: <200707250610.CAA21850@smc.vnet.net>
On Jul 25, 2007, at 1:10 AM , Januk wrote:
> Hi all,
>
> Does SphericalPlot3D offer anything over ParametricPlot3D in terms of
> its handling of functions? As far as I can tell, the following two
> lines give me pretty well exactly the same result, except that
> SphericalPlot3D line takes nearly twice as long as ParametricPlot3D.
>
> f[th_, ph_] := Cos[th] Sin[ph] (* Note this is an extremely simple
> example of what I really want *)
>
> Timing[
> SphericalPlot3D[f[th, ph], {ph, 0, \[Pi]}, {th, 0, 2 \[Pi]},
> PlotRange -> All, ImageSize -> 600]
> ];
>
> Timing[
> ParametricPlot3D[
> f[th, ph] {Cos[th] Sin[ph], Sin[th] Sin[ph], Cos[ph]}, {ph,
> 0, \[Pi]}, {th, 0, 2 \[Pi]}, PlotRange -> All, ImageSize -> 600]
> ]
>
> Other than the shorter syntax, is there any advantage to using
> SphericalPlot3D?
Everything SphericalPlot3D does can be done with ParametricPlot3D.
SphericalPlot3D packages things up a bit, including adding additional
parameters for color functions, mesh functions, and region functions.
Hopefully the speed will improve in the next release.
Brett Champion
Wolfram Research
- References:
- SphericalPlot3D in Version 6.0
- From: Januk <ggroup@sarj.ca>
- SphericalPlot3D in Version 6.0