Created
October 21, 2019 20:57
-
-
Save sassquad/b80c7101cc3338ab179da6c60bcde663 to your computer and use it in GitHub Desktop.
Drawing a heart with BBC BASIC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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