Back to draw-VTK

'draw'-VTK interface:
object parallelogram


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

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

Parallelograms: playing with colors and transparency:

draw3d(
  color = blue,
  parallelogram([0,0,0], [1,1/2,0], [0,1,0]),

  color = yellow,
  parallelogram([0,0,1], [1,1/2,1], [0,1,1]),

  opacity = 1/2,
  color = gray,
  parallelogram([0,1/2,-1/2], [0,1/2,%pi/2], [1,1/2,-1/2])  ) $
vtkpoly1

Geometric transformation of a parallelogram. The transformation affects only the three vertices, once their new position is calculated, a new parallelogram:

poly4: parallelogram([0,0,0], [1,0,0], [0,1,0]) $

draw3d(
  poly4,

  color     = red,
  transform = [x,y,z+1,x,y,z],
  poly4 ) $
vtkpoly2

© 2016, TecnoStats.