home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / graphics / fractal_1 / !Fractal / Scripts / Plate27n < prev    next >
Text File  |  1993-12-12  |  2KB  |  71 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. \ Program palette. 192 grey shades for the image & background.
  8. i=0;
  9. c=21;           \ Initial colour
  10. dc=234/192;     \ colour increment
  11. while i<192     \ set colours 0-191
  12.   pal_red i,c;
  13.   pal_green i,c;
  14.   pal_blue i,c;
  15.   i=i+1;
  16.   c=c+dc;
  17. endwhile
  18. \ Colour 192 is for Interior
  19. pal_red 192,255; pal_green 192,31; pal_blue 192,31;
  20. \ Colour of background - 63 blue shades
  21. i=193;
  22. blue=127;   \ initial blue
  23. redgreen=0; \ initial red & green
  24. drg=201/63; \ red/green increment
  25. db=128/63;  \ blue increment
  26. while i<256
  27.   pal_red i,redgreen;
  28.   pal_green i,redgreen;
  29.   pal_blue i,blue;
  30.   i=i+1;
  31.   redgreen=redgreen+drg;
  32.   blue=blue+db;
  33. endwhile
  34.  
  35. \ Draw background
  36. dy=0-y_osunits/128               \ Size of each colour band
  37. c=193
  38. y=y_osunits
  39. while c<256                      \ blue sky
  40.   colour 0,c
  41.   plot 4,0,y
  42.   plot 97,x_osunits,dy
  43.   y=y+dy
  44.   c=c+1
  45. endwhile
  46. c=64
  47. while y>0                        \ grey ground
  48.   colour 0,c
  49.   plot 4,0,y
  50.   plot 97,x_osunits,dy
  51.   y=y+dy
  52.   c=c-1
  53. endwhile
  54.  
  55. \ Draw 3d Julia using CPM
  56. fractal=Julia_Set
  57. Data x0=-2,y0=-0.8,width=4.0,height=3.2
  58. Data Max Iter=64,c Real=-0.18,c Imaginary=0.7
  59. Data Limit=1000,Slope=200,Max Colour=191
  60. Select Julia_Set,Interior,Colour,192
  61. On Julia_Set,Method,Continuous Potential
  62. 3d_Rotation=0; 3d_Elevation=40;
  63. 3d_Scalar=0.65; 3d_Linear
  64. 3d_XY_Plot On
  65. Off Image,Redraw,Clear
  66. Draw
  67.  
  68. \ Clean up
  69. On Image,Redraw,Clear
  70. 3d_XY_Plot Off
  71.