Example: Spiral Tunnels

TO spiraltunnelanimation
  reset fullscreen
  setbackgroundcolor 0
  dropanchor penup
  raise 190 pullout 50
  
  repeat 2100 [
    setfillshade -15 + int (repcount / 65)
    
    setfillcolor (item 1 + remainder int (repcount / 2.35) 8
    {red orange yellow green lightgreen cyan blue magenta})
    
    voxeloid 7 12 20
    
    orbitleft 10.1 lower 0.6
  ]
  
  home lower 3000
  setmodelscale 2.5
  down 90 right 180
  make "dir 0
  snappy:setanchor [0 0 -1050]
  
  forever [
    forward 2 rollright 0.1
    if zpos > 1500 [setz -3000]
    snappy:rollleft 0.05 snappy:pullin 0.1
    
    if and :dir = 0 snappy:orbitdistance = 0 [
      make "dir 1
      snappy:right 180
      setbackgroundcolor 15
      snappy:setanchor [0 0 180]
    ]
    
    if and :dir = 1 snappy:orbitdistance = 0 [
      make "dir 0
      snappy:right 180
      setbackgroundcolor 0
      snappy:setanchor [0 0 -1050]
    ]
  ]
END