home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / graphics / fractal_1 / !Fractal / Scripts / Plate27 < prev    next >
Text File  |  1993-09-21  |  2KB  |  76 lines

  1. Script
  2. \ This script draws a 3d Julia similar to Plate 27 in "Science Of Fractal Images".
  3. \ After plotting you will need to set the screen palette (Palette->Set Screen),
  4. \ assuming you have a colour card. Otherwise save the image and load it into
  5. \ Translator v7+ which will give a good dithered representation.
  6.  
  7. Select Image,Mode,103            \ CC's Mode 103 if available
  8. if errcnt>0
  9.   Select Image,Mode,21
  10. endif
  11.  
  12. \ Program palette. 192 grey shades for the image & background.
  13. i=0;
  14. c=21;           \ Initial colour
  15. dc=234/192;     \ colour increment
  16. while i<192     \ set colours 0-191
  17.   pal_red i,c;
  18.   pal_green i,c;
  19.   pal_blue i,c;
  20.   i=i+1;
  21.   c=c+dc;
  22. endwhile
  23. \ Colour 192 is for Interior
  24. pal_red 192,255; pal_green 192,31; pal_blue 192,31;
  25. \ Colour of background - 63 blue shades
  26. i=193;
  27. blue=127;   \ initial blue
  28. redgreen=0; \ initial red & green
  29. drg=201/63; \ red/green increment
  30. db=128/63;  \ blue increment
  31. while i<256
  32.   pal_red i,redgreen;
  33.   pal_green i,redgreen;
  34.   pal_blue i,blue;
  35.   i=i+1;
  36.   redgreen=redgreen+drg;
  37.   blue=blue+db;
  38. endwhile
  39.  
  40. \ Draw background
  41. dy=0-y_osunits/128               \ Size of each colour band
  42. c=193
  43. y=y_osunits
  44. while c<256                      \ blue sky
  45.   colour 0,c
  46.   plot 4,0,y
  47.   plot 97,x_osunits,dy
  48.   y=y+dy
  49.   c=c+1
  50. endwhile
  51. c=64
  52. while y>0                        \ grey ground
  53.   colour 0,c
  54.   plot 4,0,y
  55.   plot 97,x_osunits,dy
  56.   y=y+dy
  57.   c=c-1
  58. endwhile
  59.  
  60. \ Draw 3d Julia using CPM
  61. fractal=Julia_Set
  62. Data x0=-2,y0=-0.8,width=4.0,height=3.2
  63. Data Max Iter=64,c Real=-0.18,c Imaginary=0.7
  64. Data Limit=1000,Slope=200,Max Colour=191
  65. Select Julia_Set,Interior,Colour,192
  66. On Julia_Set,Method,Continuous Potential
  67. 3d_Rotation=0; 3d_Elevation=40;
  68. 3d_Scalar=1.3; 3d_Linear
  69. 3d_XY_Plot On
  70. Off Image,Redraw,Clear
  71. Draw
  72.  
  73. \ Clean up
  74. On Image,Redraw,Clear
  75. 3d_XY_Plot Off
  76.