New visualization package



Hi,
I committed today a package share/dynamics/visualization.lisp that sends
its output to Xmaxima, in a similar fashion as
plot2d(...[plot_option,xmaxima]) does.

It uses the Tcl version of VTK to create 3D scenes. Something similar to
what Mario has proposed in a previous message but it also makes
animations. In Ubuntu, the package vtk-tcl is required.

Here are some examples:

Example 1 (a cone)
scene([cone]);

Example 2 (sphere and cone)
ball: [sphere,[position,0.8,0,0], [thetaresolution,40],
[phiresolution,40], [color,1,0.3882,0.2784]]$
cone: [cone,[color,1,1,0.5],[resolution,12],[capping,0]]$
scene([ball, cone], [background, 0.1, 0.2, 0.4]);

Example 3 (bouncing ball)
pos: makelist([0,0,2.1-9.8*(0.01*i)^2/2],i,0,64)$
pos: append(pos, reverse(pos))$
ball:[sphere,[radius,0.1],[thetaresolution,20],[phiresolution,20],
      [position,0,0,2.1],[color,1,0,0],[animate,position,pos]]$
ground:[cube,[xlength,2],[ylength,2],[zlength,0.2],[position,0,0,-0.1],
      [color,0.8,1.0,0.6]]$
scene([ball, ground],[restart,1]);

While I work in documenting it, you can look at
share/dynamics/visualization.lisp to see the VTK classes and Methods
implemented at this time.

Regards,
Jaime