home *** CD-ROM | disk | FTP | other *** search
/ AMOS PD CD / amospdcd.iso / 451-475 / apd453 / wire.amos / wire.amosSourceCode
AMOS Source Code  |  1993-01-08  |  913b  |  51 lines

  1. Screen Open 1,640,256,4,Hires
  2. Wind Open 1,0,0,78,28
  3. Pen 2
  4. Clw 
  5. Input "Angle of tilt? (0-90) ";M#
  6. O#=M#/90
  7. Print 
  8. Input "Magnification? ";K
  9. Print 
  10. Input "Twist degrees? (per segment) ";TD
  11. TW=TD
  12. Restore 
  13. Read N,S
  14. Dim X(S+1,N+1),Y(S+1,N+1),R#(N),C#(N)
  15. For L=1 To N
  16.  Read C#(L),R#(L)
  17. R#(L)=R#(L)*K
  18.  C#(L)=C#(L)*K
  19. C#(L)=(C#(L)/90)*(90-M)
  20.  C#(L)=C#(L)+M-(K*5)
  21. Next L
  22. Print 
  23. Print "Please wait ";S*N*0.134;" seconds"
  24. B=0
  25. L00P1:
  26.   A=1
  27.   For I#=TW+SD To 359+(360/S)+TW+SD Step 360/S
  28.    D#=I#*Pi#/180
  29.    X(A,B)=315+(R#(B)*Cos(D#))
  30.    Y(A,B)=20+(C#(B)+((R#(B)*O#)*Sin(D#))*0.5)
  31.    Inc A
  32.   Next I#
  33.   Inc B
  34. TW=TW+TD
  35. If B<=N Then Goto L00P1
  36. For Z=1 To S
  37.   X(Z,N+1)=X(Z,N) : Y(Z,N+1)=Y(Z,N)
  38. Next Z
  39. Clw 
  40. TW=TD
  41. For J=1 To S
  42.  For U=1 To N
  43.    Draw X(J,U),Y(J,U) To X(J+1,U),Y(J+1,U)
  44.    Draw X(J,U),Y(J,U) To X(J,U+1),Y(J,U+1)
  45.  Next U
  46. Next J
  47. SD=SD+10
  48. B=0
  49. Goto L00P1
  50. Data 8,30
  51. Data 30,160,80,130,20,100,115,70,70,56,140,56,20,30,35,10