Back to draw-VTK

'draw'-VTK interface:
object label


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

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

Labels of different sizes and colors. Fonts and horizontal and vertical alignment not yet implemented:

draw3d(
  axis_3d = false,
    
  points_joined = true,
  point_type    = dot,
  line_width    = 2,
  points ([[0,0,-6],[0,0,6]]),
    
  color           = violet,
  font_size       = 1/2,
  label(["Violet size 1",0,0,-6]),

  color           = blue,
  font_size       = 1,
  label(["Blue size 1",0,0,-3]),

  color           = black,
  font_size       = 2,
  label(["Black size 2",0,0,0]),

  color           = red,
  font_size       = 3,
  label(["Red size 3",0,0,3]),

  color           = brown,
  font_size       = 4,
  label(["Brown size 4",0,0,6]) ) $
label1

Writing multiple lines. Unicode is not yet implemented:

draw3d(
  axis_3d = false,

  color = brown,
  parallelogram([0,18,-5], [0,-180,-5], [250,18,-5]),
    
  color = cyan,
  label(["Recuerde el alma dormida,",0,0,0],
        ["avive el seso y despierte",0,-15,0],
        ["contemplando",0,-30,0],
        ["como se pasa la vida,",0,-45,0],
        ["como se viene la muerte",0,-60,0],
        ["tan callando,",0,-75,0],
        ["cuan presto se va el placer,",0,-90,0],
        ["como, despues de acordado,",0,-105,0],
        ["da dolor;",0,-120,0],
        ["como, a nuestro parecer,",0,-135,0],
        ["cualquier tiempo pasado",0,-150,0],
        ["fue mejor.",0,-165,0]),
     
  color     = black,
  font_size = 8,
  label(["Jorge Manrique (1440-1479)", 100, -190, 50])) $
label2

© 2016, TecnoStats.