Skip to content

Instantly share code, notes, and snippets.

@zygm0nt
Last active May 4, 2024 21:13
Show Gist options
  • Save zygm0nt/eb98c3ee888269d0cc3f88d62ffd7c31 to your computer and use it in GitHub Desktop.
Save zygm0nt/eb98c3ee888269d0cc3f88d62ffd7c31 to your computer and use it in GitHub Desktop.
Schotter_Georg-Nees - rectangles

Run with BBC Basic. Eg. with brandy emulator.

brandy -lo schotter
MODE 27
ORIGIN 240, 900
H=15
SP=22
DP=.45
SQ=30
RS=0.0
GCOL 42
FOR Y=1 TO 20
RS=RS + Y*SP
FOR X=1 TO 12
RV = RAD(RND(1) * (2 * RS) - RS)
C=(H*COS((RV*PI/180)))
S=(H*SIN((RV*PI/180)))
A=X*SQ + RV*DP
B=-Y*SQ + RV*DP
X1=A+C-S
Y1=B+C+S
X2=A-C-S
Y2=B+C-S
X3=A-C+S
Y3=B-C-S
X4=A+C+S
Y4=B-C+S
LINE X2,Y2 , X1,Y1
LINE X1,Y1 , X4,Y4
LINE X4,Y4 , X3,Y3
LINE X3,Y3 , X2,Y2
NEXT X
NEXT Y
END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment