RosettaCodeData/Task/Draw-a-sphere/Maxima/draw-a-sphere.maxima
Ingy döt Net db842d013d A-M baby
2013-04-10 21:29:02 -07:00

11 lines
387 B
Text

/* Two solutions */
plot3d(1, [theta, 0, %pi], [phi, 0, 2 * %pi],
[transform_xy, spherical_to_xyz], [grid, 30, 60],
[box, false], [legend, false])$
load(draw)$
draw3d(xu_grid=30, yv_grid=60, surface_hide=true,
parametric_surface(cos(phi)*sin(theta),
sin(phi)*sin(theta),
cos(theta),
theta, 0, %pi, phi, 0, 2 * %pi))$