home *** CD-ROM | disk | FTP | other *** search
/ 64'er 1985 November / 64er_Magazin_85-11_1985_Markt__Technik_de.d64 / plotter-spiralen (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  1KB  |  48 lines

  1. 1 rem**********************************
  2. 2 rem*                                *
  3. 3 rem*     verschlungene spiralen     *
  4. 4 rem*   version fuer plotter 1520    *
  5. 5 rem*                                *
  6. 6 rem*  heimo ponnath  hamburg  1985  *
  7. 7 rem*                                *
  8. 8 rem**********************************
  9. 9 rem ***** eingaben ******************
  10. 10 poke53280,0:poke53281,0:poke646,5:printchr$(147)
  11. 15 input"anzahl spiralen";n:input"textstart xt,yt";xt,yt
  12. 20 input"radius,startwinkel";r,a1
  13. 22 rem**** init ****
  14. 23 open1,6,1:open2,6,2:print#2,0:close2
  15. 25 rem**** start ****
  16. 26 print#1,"m",0,-200:print#1,"i"
  17. 30 rem**** mitte ****
  18. 32 print#1,"r",240,0:print#1,"i":gosub100
  19. 33 rem **** kreis ******
  20. 35 m=50:d=360*(NULL)/(m*180):dimk(m):k(0)=2*(NULL)
  21. 36 fori=1tom:k(i)=k(i-1)+d:print#1,"r",r*cos(k(i-1)),r*sin(k(i-1))
  22. 37 print#1,"j",r*cos(k(i)),r*sin(k(i)):nexti:print#1,"h"
  23. 40 a$="verschlungene spiralen"
  24. 42 rem**** text ****
  25. 43 open4,6:print#1,"r",xt,yt:print#4,a$:close4
  26. 45 print#1,"m",240,-yt:print#1,"i"
  27. 50 rem**** show ****
  28. 52 print#1,"r",0,-200:print#1,"i"
  29. 55 poke198,0:wait198,1
  30. 60 rem**** normal ****
  31. 62 print#1,"h":close1
  32. 65 rem**** werte ausdrucken *****
  33. 70 open3,6,3:print#3,0:open4,6:print#4:print#4," n","  xt","  yt","  r","  w"
  34. 75 print#4,n,xt,yt,r,a1:print#3,1:print#4:close4:close3
  35. 80 rem**** greset ****
  36. 85 open7,6,7:print#7:close7
  37. 90 end
  38. 100 rem****** unterprogramm zeichnen ***
  39. 102 nn=n*100:ra=r/nn:dimt(nn):a=a1
  40. 105 forj=1ton:a=a+2*(NULL)/n
  41. 110 t=a:th=2*(NULL)/100:t(0)=t
  42. 115 fori=1tonn:t(i)=t(i-1)+th:rr=ra*i
  43. 120 print#1,"r",(rr-ra)*cos(t(i-1)),(rr-ra)*sin(t(i-1))
  44. 122 print#1,"j",rr*cos(t(i)),rr*sin(t(i))
  45. 125 nexti
  46. 130 nextj
  47. 135 return
  48.