*** This script generates an array of hyperbolas.

// Parameter list begins
mov r90 0 // Center X
mov r91 0 // Center Y
mov r92 4096 // Semi-major axis length
mov r93 4096 // Semi-minor axis length
mov r94 -15360 // Initial angle
mov r95 15360 // Final angle
mov r96 64 // Number of samples
mov r97 -256 // Semi-major axis length increment
mov r98 -256 // Semi-minor axis length increment
mov r99 1 // Number of hyperbolas
// Parameter list ends
~~~ Default parameters:
~~~ mov r90 0 // Center X
~~~ mov r91 0 // Center Y
~~~ mov r92 4096 // Semi-major axis length
~~~ mov r93 4096 // Semi-minor axis length
~~~ mov r94 -15360 // Initial angle
~~~ mov r95 15360 // Final angle
~~~ mov r96 64 // Number of samples
~~~ mov r97 -256 // Semi-major axis length increment
~~~ mov r98 -256 // Semi-minor axis length increment
~~~ mov r99 1 // Number of hyperbolas
setselectionmode 6 // Figured sector modeling
setfsmbooleanmode 2 // Union
settool 0 // General
deselectsectors
if r96 <= 0  end  endif
sub r95 r94 // Get angle increment

mov r06 0
while r06 < r99
  mov r00 0
  mov r01 r94
  mul r01 r96
  while r00 <= r96
    mov r02 r01
    div r02 r96
    sin r03 r02
    cos r04 r02
    mul r03 r93
    div r03 r04
    mov r05 r92
    mul r05 65536
    div r05 r04
    add r03 r90
    add r05 r91
    sethitpoint r03 r05
    hitspace
    add r01 r95
    inc r00
  continue
  gettoolvertx 0 r00
  gettoolverty 0 r01
  sethitpoint r00 r01
  hitspace
  settool 0 // Prevent glitches
  deselectsectors
  add r92 r97
  add r93 r98
  inc r06
continue