Skip to content

Instantly share code, notes, and snippets.

@digarok
Created September 6, 2020 01:26
Show Gist options
  • Save digarok/5b92b3c489119d1abbe0ad1b8a4c1e64 to your computer and use it in GitHub Desktop.
Save digarok/5b92b3c489119d1abbe0ad1b8a4c1e64 to your computer and use it in GitHub Desktop.
A nice HGR "floral" effect for Apple II computer in AppleSoft BASIC.
REM "Trust the voice inside of you" - Digarok 2020-09-04
REM Reference: "Three Ways of Looking At A Function""
REM by James Fuller
REM January 1983 (c) Creative Computing
100 DEF FN R(Q) = COS(9 * SIN(2*Q)) : HGR : POKE -16302,0: SZ=5:
700 FOR BB=SZ TO 0 STEP -1: SX=2*BB/SZ:SY=SX:HCOLOR=RND(1)*7+1
800 FOR G = 0 TO 360 STEP 1
810 T = G / 57.29576
820 X = FN R(T) * COS(T) : Y = FN R(T) * SIN(T)
840 XX = X * (64 * SX) + 139 : YY = -Y * (44 * SY) + 96
890 IF G > 0 THEN HPLOT XX, YY TO LL, MM: HPLOT XX+1,YY TO LL+1, MM
895 LL=XX: MM=YY
900 NEXT G : NEXT BB : GOTO 100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment