Skip to content

Instantly share code, notes, and snippets.

@sassquad
Created October 21, 2019 20:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save sassquad/b80c7101cc3338ab179da6c60bcde663 to your computer and use it in GitHub Desktop.
Save sassquad/b80c7101cc3338ab179da6c60bcde663 to your computer and use it in GitHub Desktop.
Drawing a heart with BBC BASIC
REM Drawing a heart
REM from StackOverflow Codegolf thread - https://codegolf.stackexchange.com/questions/109917/draw-plot-a-heart-graph/
MODE 1
VDU 29,64;64;
MOVE -57,20
GCOL 0,1
FOR U = -56 TO 56
X = U/50
IF X <> 0 THEN B = X^2^.33/2
R = (B^2-X^2+1)^.5*50
DRAW U,B*50+R
DRAW U,B*50-R
NEXT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment