Back to draw-VTK

'draw'-VTK interface:
object sphere


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

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

The sphere object needs two arguments: center and radius:

draw3d(
    color = red,
    sphere([0,2,0],1),
    color = green,
    sphere([0,2,2],1),
    color = blue,
    sphere([0,2,4],1) ) $
vtksol1

Family of available 3d objects. We make use here of two global options: with axis_3d = false axes box is removed and with dimensions = [300,300] we fix the window dimensions:

draw3d(
  axis_3d    = false, 
  dimensions = [300,300],

  color      = red,
  cone([0,0,0],1,1,[0,2,1]),
  color      = blue,
  cylinder([0,0,2],1,1,[0,0,1]),
  color      = dark_yellow,
  cube(1,1,1,[0,0,4]),
  color      = light_gray,
  sphere([0,2,0],1))$
vtksol2

© 2016, TecnoStats.