El vie, 27-07-2012 a las 20:22 +0200, Jean-Fran?ois MAUREL escribi?:
> Hi,
>
> I am using wxmaxima on windows vista.
> I would like to draw a cylinder. I only obtain a circle:
>
> r:1$
> x:r*cos(theta)$
> y:r*sin(theta)$
> p:plot3d([x,y,z],[theta,-%pi,%pi],[z,0,10])$
>
> Could someone tell me what I am missing here?
You can use package draw:
load(draw) $
/* with a parametric surface */
draw3d(parametric_surface(x, y, z,th,-%pi,%pi,z,0,10)) $
/* with tubes */
draw3d(
enhanced3d = true,
palette = gray,
tube_extremes = [closed, open],
tube(0, 0, z, r, z, 0, 10) )$
You can find some other examples here:
http://riotorto.users.sourceforge.net/gnuplot/parametric
If you want to give vtk a try, which is experimental, see
http://riotorto.users.sourceforge.net/vtk
draw_renderer : vtk $
/* with a cylinder object */
draw3d(
color = yellow,
cylinder(10,r,[0,0,5],10,false) ) $
/* as two points joined by a tube */
draw3d(
points_joined = true,
point_type = dot,
enhanced3d = true,
line_width = r,
line_type = tube,
points([[0,0,0], [0,0,10]])) $
--
Mario