Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 5 rem 'cannabis curve' in basic v2 for commodore 64
- 10 rem implemented by felice nardella
- 15 t=ti
- 20 poke53280,15:s=8192
- 25 poke53272,peek(53272)or8:poke53265,peek(53265)or32
- 30 gosub200
- 35 rem clear color ram
- 40 cb$="pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp"
- 45 cb$=cb$+cb$:cb$=cb$+left$(cb$,121)
- 50 print"{clear}"cb$cb$cb$cb$;:print"ppp";:poke2023,16
- 55 tw(0)=1:fori=1to7:tw(i)=tw(i-1)*2:next
- 60 fori=1024to2023:pokei,208:next
- 65 goto95
- 70 rem plot x,y
- 75 p=s+320*int(y/8)+8*int(x/8)+(yand7)
- 80 pokep,peek(p)ortw(7-(xand7))
- 85 return
- 90 rem main
- 95 deffnc(t)=(1+.9*cos(8*t))*(1+.1*cos(24*t))*(.9+.05*cos(200*t))*(1+sin(t))
- 100 z=pi/2:fori=-pito-.5step.001
- 105 a=i-z:r=fn c(a):d=40*r:b=d*sin(i):c=d*cos(i)
- 110 x=160+b
- 115 y=170+c
- 120 gosub75: rem plot x,y
- 125 x=160-b
- 130 gosub75: rem plot x,y
- 135 next
- 140 rem end main
- 145 rem time calc
- 150 te=ti-t
- 155 rem wait for a key
- 160 poke198,0:wait198,1
- 165 gosub200
- 170 rem turn graphics off
- 175 printchr$(147)"elapsed time ="te/3600"min"
- 180 poke53265,peek(53265)and(223)
- 185 poke53272,21:poke53280,14
- 190 end
- 195 rem clear graphic ram
- 200 cb$=""
- 205 p1=peek(51):p2=peek(52)
- 210 poke51,64:poke52,63
- 215 forcn=1to125:cb$=cb$+chr$(0):next
- 220 poke51,p1:poke52,p2
- 225 return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement