| Posted: 09:48pm 11 Dec 2024 |
|
|
|
∞ Lissajous Figures ∞

Option ANGLE DEGREES FRAMEBUFFER CREATE FRAMEBUFFER WRITE F Colour RGB(Cyan),RGB(Blue)
CX=MM.HRes/2: CY=MM.VRes/2 Scale=0.95: AX=CY*Scale: AY=CY*Scale a=1: b=0: p=0: f=0: c=0
Do If p>360 Then p=0: EndIf If b>6 Then a=a+1: b=0: c=0: EndIf If a>5 Then a=1: b=0: c=0: EndIf If c=50 Then f=1 If a=Fix(b) Then f=0: c=0: EndIf EndIf If c=130 Then f=0: c=0: EndIf
CLS sx= AX * Sin(p) + CX sy= AY * Sin(p) + CY For i= 0 To 360 x = AX * Sin(a*i + p) + CX y = AY * Sin(b*i + p) + CY Line sx,sy,x,y sx=x: sy=y Next i
Print "a ="a: Print "b ="b FRAMEBUFFER COPY F,N,B
Inc p: Inc c If f=0 Then b=b+.02: EndIf
Loop Until Inkey$ <> "" End |