Skip to content

Instantly share code, notes, and snippets.

@tomaes
Created May 30, 2014 06:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomaes/d14a8c9d802fb5d4bfe2 to your computer and use it in GitHub Desktop.
Save tomaes/d14a8c9d802fb5d4bfe2 to your computer and use it in GitHub Desktop.
Someone was asking for this. ;)
1 rem c128 heart curve
2 color 4,5: rem bg
4 color 0,1: rem screen
6 color 1,3: rem drawing color
8 graphic 1,1:h=200:hh=100:wh=160:cw=10:ch=6
10 forx=-.99to1step.06
20 q=sqr(1-x*x)
22 y0=sqr(x*x)-q
24 y1=sqr(x*x)+q
44 xa=int((x+1)*wh):ya=h-int((y0+1)*hh)
48 yb=40-int((y1-1)*hh)
50 draw 1,xa,ya:draw 1,xa,yb
56 circle 1,xa,ya,cw,ch
58 circle 1,xa,yb,cw,ch
60 next
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment