home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1986 November / 1986-11.d64 / fill_demo (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  3KB  |  75 lines

  1. 90 poke51,255:poke52,63:poke55,255:poke56,63
  2. 100 input"[147]do you want to save (y/n)";ns$:ifns$="n"then140
  3. 110 ifns$<>"y"then100
  4. 120 input"disk or tape (d/t)";dv$
  5. 130 if(dv$<>"d")and(dv$<>"t")then120
  6. 140 (NULL):(NULL) 1,6,0,14,1:sc=9:(NULL):fors=1to70:an=an+10:c=c+1:sc=sc*.94
  7. 150 th=an*(NULL)/180
  8. 160 a(1)=-10:b(1)=10:a(2)=10:b(2)=10:a(3)=10:b(3)=-10:a(4)=-10:b(4)=-10
  9. 170 nu=4:gosub1000:next
  10. 180 ifdv$="d"then:(NULL)"squares"
  11. 190 ifdv$="t"then:(NULL):(NULL)"squares"
  12. 200 (NULL):(NULL):(NULL)
  13. 210 (NULL) 1,6,0,7,1:sc=2:(NULL):c=0:an=0:fors=0to70:c=c+1:sc=sc*.94
  14. 220 th=an*(NULL)/180
  15. 230 a(1)=-60:b(1)=40:a(2)=60:b(2)=40:a(3)=0:b(3)=-75:nu=3:gosub1000
  16. 240 a(1)=0:b(1)=75:a(2)=60:b(2)=-40:a(3)=-60:b(3)=-40:gosub1000:an=an+5:next
  17. 250 ifdv$="d"then:(NULL)"stars"
  18. 260 ifdv$="t"then:(NULL):(NULL)"stars"
  19. 270 (NULL):(NULL):(NULL)
  20. 280 sc=2:c=0:th=0:(NULL) 1,3,5,7,9:(NULL):fors=0to70:c=c+1:sc=sc*.94
  21. 290 a(1)=-60:b(1)=40:a(2)=60:b(2)=40:a(3)=0:b(3)=-75:nu=3:gosub1000
  22. 300 a(1)=0:b(1)=75:a(2)=60:b(2)=-40:a(3)=-60:b(3)=-40:nu=3:gosub1000:next
  23. 310 ifdv$="d"then:(NULL)"more stars"
  24. 320 ifdv$="t"then:(NULL):(NULL)"more stars"
  25. 330 (NULL):(NULL):(NULL)
  26. 340 sc=5:c=0:an=0:(NULL) 1,0,7,14,1:(NULL):fors=0to1040:sc=sc+.1:c=c+1
  27. 350 ifc=4thenc=1
  28. 360 th=an*(NULL)/180:a(1)=0:b(1)=0:a(2)=0:b(2)=1:nu=2:gosub1000:an=an+5:next
  29. 370 ifdv$="d"then:(NULL)"rays"
  30. 380 ifdv$="t"then:(NULL):(NULL)"rays"
  31. 390 (NULL):(NULL):(NULL):(NULL)
  32. 400 of=135:sc=700:gap=500:dg=(NULL)/180:(NULL) 1,6,0,7,1:(NULL)
  33. 410 foran=0to180step5:th=an*dg:forbe=0to360step5:gm=be*dg:dl=(be+of)*dg
  34. 420 a(1)=-50:b(1)=40*sin(gm):c(1)=40*cos(gm)
  35. 430 a(2)=50:b(2)=40*sin(dl):c(2)=40*cos(dl)
  36. 440 forn=1to2:gosub4000:gosub5000:next:c=3:gosub1020:nextbe:(NULL):nextan
  37. 450 ifdv$="d"then:(NULL)"wires"
  38. 460 ifdv$="t"then:(NULL):(NULL)"wires"
  39. 470 (NULL):(NULL):(NULL):print"[147]please wait..."
  40. 480 dim sn(360),cs(360):dg=(NULL)/180:forx=0to360step2:th=x*dg:sn(x)=sin(th)
  41. 490 cs(x)=cos(th):next:of=135:sc=350:ga=25:gm=30*dg:(NULL) 1,0,2,7,5:(NULL)
  42. 500 foran=0to342step2:th=an*dg:restore:forfa=1to6:readc
  43. 510 forve=1to4:reada(ve),b(ve),c(ve):nextve
  44. 520 forn=1to4:gosub6000:gosub7000
  45. 530 a(n)=a(n)+4-an/50:b(n)=b(n)+4-an/50:c(n)=c(n)-an/20:gosub5000:nextn
  46. 540 gosub1040:nextfa:(NULL):nextan
  47. 550 ifdv$="d"then:(NULL)"cube"
  48. 560 ifdv$="t"then:(NULL):(NULL)"cube"
  49. 570 (NULL):(NULL):(NULL):end
  50. 1000 forn=1tonu:gosub2000:gosub3000:next
  51. 1010 on nu-1 gosub 1020,1030,1040:return
  52. 1020 (NULL) 2,c,a(1),b(1),a(2),b(2):return
  53. 1030 (NULL) 3,c,a(1),b(1),a(2),b(2),a(3),b(3):return
  54. 1040 (NULL) 4,c,a(1),b(1),a(2),b(2),a(3),b(3),a(4),b(4):return
  55. 2000 q=a(n)*cos(th)+b(n)*sin(th)
  56. 2010 b(n)=-a(n)*sin(th)+b(n)*cos(th)
  57. 2020 a(n)=q:return
  58. 3000 a(n)=80+sc*a(n):b(n)=100-1.4*sc*b(n):return
  59. 4000 q=a(n)*cos(th)+c(n)*sin(th)
  60. 4010 c(n)=-a(n)*sin(th)+c(n)*cos(th)
  61. 4020 a(n)=q:return
  62. 5000 k=ga+c(n):a(n)=80+sc*a(n)/k:b(n)=100-1.4*sc*b(n)/k:return
  63. 6000 q=b(n)*cs(30)+c(n)*sn(30)
  64. 6010 c(n)=-b(n)*sn(30)+c(n)*cs(30)
  65. 6020 b(n)=q:return
  66. 7000 q=a(n)*cs(an)+c(n)*sn(an)
  67. 7010 c(n)=-a(n)*sn(an)+c(n)*cs(an)
  68. 7020 a(n)=q:return
  69. 8000 data 1,-1,+1,-1,+1,+1,-1,+1,-1,-1,-1,-1,-1
  70. 8010 data 2,+1,+1,-1,+1,+1,+1,+1,-1,+1,+1,-1,-1
  71. 8020 data 1,+1,+1,+1,-1,+1,+1,-1,-1,+1,+1,-1,+1
  72. 8030 data 2,-1,+1,+1,-1,+1,-1,-1,-1,-1,-1,-1,+1
  73. 8040 data 3,-1,+1,+1,+1,+1,+1,+1,+1,-1,-1,+1,-1
  74. 8050 data 3,+1,-1,-1,+1,-1,+1,-1,-1,+1,-1,-1,-1
  75.