plot::spherical
-- generate
plots in spherical coordinatesplot::spherical
([theta, phi, r], u = a..b, v =
c..d)
represents a plot of the surface defined by (u,v)
-> (theta(u,v); phi(u,v); r(u,v)) with (u,v) in [a,b] x
[c,d] in the spherical coordinates theta, phi, r.
plot::spherical([theta, phi, r], u = a..b, v =
c..d))
theta, phi, r |
- | arithmetical expressions in u and
v |
u, v |
- | identifiers |
a, b, c, d |
- | arithmetical expressions |
option1, option2, ... |
- | plot option(s) for three-dimensional graphical objects |
Call plot(...)
to display the result on the screen.
a graphical object of the domain type plot::Surface3d
.
plot
, plot2d
, plot::cylindrical
, plot::polar
x = r*cos(phi)*sin(theta), y = r*sin(phi)*sin(theta), z = r*cos(theta).
option1
, option2
... must
be valid plot options for three-dimensional graphical objects. See
plot::Surface3d
for
details.
Note that scene options are not allowed! You may
give scene options as optional arguments for the function plot
, or use plot::Scene
to create an object
representing a graphical scene.
We define a three-dimensional surface in spherical coordinates:
>> s:= plot::spherical( [1, u, z], u = -PI..PI, z = -1..1, Grid = [20, 20] )
plot::Surface3d([cos(u) sin(z), sin(u) sin(z), cos(z)], u = -PI..PI, z = -1..1)
>> plot(s, Axes = Box)
We plot the surface (phi, theta) -> [1, phi, theta] in [-PI,PI] x [0,PI] (setting the number of surface points to 20):
>> delete phi, theta: plot(plot::spherical( [1, phi, theta], phi = -PI..PI, theta = 0..PI, Grid = [20, 20] ), Axes = Box)
plotlib::sphericalplot
plot::spherical
is now part of the new plot library
plot
, and thus its calling syntax and the return value
were changed.