home *** CD-ROM | disk | FTP | other *** search
/ Falcon 030 Power 2 / F030_POWER2.iso / ST_STE / DEMOS / MEGADEMO / PASSIONP.ARJ / PASSIONP.MSA / JELLY / GEL_EDGE.LST < prev    next >
File List  |  1997-03-05  |  2KB  |  51 lines

  1. ' ****  Little proggy which creates the "jelly" edges of the cube for  ****
  2. ' ****    a jelly_coef between 16 and -8. (The height is always 96)    ****
  3. ' I put a lot of mess in this program so that the edges look nice, so......
  4. a$=SPACE$(96*25*2)      ! 25 edges, with a height of 96 each.
  5. adr%=VARPTR(a$)
  6. ~XBIOS(5,L:-1,L:-1,W:0)
  7. ' * First type of edge: _______
  8. ' *                     \     /
  9. ' *                      \   /
  10. ' *                       ) (
  11. ' *                      /   \
  12. ' *                     /     \
  13. ' *                     -------
  14. FOR comp%=24 TO 31
  15.   DPOKE adr%,32*4    ! Cos sin(0)<>0. (?!)
  16.   adr%=adr%+2
  17.   FOR y%=1 TO 94
  18.     edge%=33+(comp%-33)*SQR(SIN(PI*y%/95))
  19.     DPOKE adr%,edge%*4   ! Multiply by 4, cos adresse of a zoom routs=4 bytes.
  20.     adr%=adr%+2
  21.   NEXT y%
  22.   DPOKE adr%,32*4    ! Cos sin((95*pi)/95)<>0. (?!)
  23.   adr%=adr%+2
  24. NEXT comp%
  25. ' * Second type of edge: _______
  26. ' *                      |     |
  27. ' *                      |     |
  28. ' *                      |     |
  29. ' *                      -------
  30. FOR y%=0 TO 95
  31.   DPOKE adr%,32*4
  32.   adr%=adr%+2
  33. NEXT y%
  34. ' * Last type of edge: _______
  35. ' *                   /       \
  36. ' *                  (         )
  37. ' *                   \       /
  38. ' *                    -------
  39. FOR comp%=33 TO 48
  40.   FOR y%=0 TO 95
  41.     edge%=32-(31-comp%)*SQR(SIN(PI*y%/95))
  42.     DPOKE adr%,edge%*4   ! Multiply by 4, cos adresse of a zoom routs=4 bytes.
  43.     adr%=adr%+2
  44.   NEXT y%
  45. NEXT comp%
  46. ' *
  47. ' * Save the gel edges.
  48. ' *
  49. adr%=VARPTR(a$)
  50. BSAVE "a:\jelly\gel_edge.xxx",adr%,25*96*2
  51.