REM three dimensional lissajous figures program for Vivid input
PI = 3.1415936#
DEG = PI / 180
A1 = 1.5
B1 = 2
C1 = 3
AP = 90
BP = 180
CP = 0: REM set phase offsets
S = 10: REM set dimension scale amplifier
PRINT "// Produced by LISS.BAS by Paul Smith (c) 1992"
PRINT "// data as follows : "
PRINT "// A1="; A1; " B1= "; B1; " C1= "; C1; ""
PRINT "// AP="; AP; " BP= "; BP; " CP= "; CP; ""

FOR P = 0 TO 720 STEP 2
A = P * A1: B = P * B1: C = P * C1
x = SIN((A + AP) * DEG) + COS((B + BP) * DEG)
y = SIN((B + BP) * DEG) + COS((C + CP) * DEG)
z = SIN((C + CP) * DEG) + COS((A + AP) * DEG)
x = x * S: y = y * S: z = z * S
GOSUB DOONE:
NEXT P
SYSTEM


DOONE:
PRINT "sphere {"
PRINT "center";
PRINT USING " ###.#####"; x; y; z
PRINT "radius";
PRINT USING " ###.#####"; .5
PRINT "}"
PRINT
RETURN



