Back to draw-VTK

'draw'-VTK interface:
object Animations

Once you have opened a Maxima session, load package draw and then set global variable draw_renderer to vtk:

load("draw") $
draw_renderer: 'vtk $

Despite the fact that it is possible to make animations with VTK, they have not yet been incorporated into the Maxima-VTK interface. We show here how to circumvent this fact and make gif animations with the help of imagemagick:

for d:5 thru 360 step 5 do
    terminal         = png,
    dimensions       = [400,400],
    background_color = cyan,
    file_name        = concat ("cono", add_zeroes(d) ),
    axis_3d          = false,
    view             = [d, d],
    xu_grid          = 70,
    yv_grid          = 70,
    enhanced3d       = [sin(r*s),r,s],
    color            = gray,
    opacity          = 4/5,
    parallelogram([30,30,40], [30,-30,50], [-15,30,-35]) )$

The code above creates a sequence of graphics in PNG format. To see an animation of them simply type the following sentence:

system("animate -delay 15 *.png")$

And to build an animated gif file, write

system("convert -delay 15  *.png cono.gif")$

This is the result:


© 2016, TecnoStats.