home *** CD-ROM | disk | FTP | other *** search
/ AMOS PD CD / amospdcd.iso / 126-150 / apd133 / generator512k / generator512k.amosSourceCode < prev    next >
Encoding:
AMOS Source Code  |  1994-01-01  |  21.4 KB  |  793 lines

  1. On Error Goto HANDLE
  2. THE_START:
  3. Change Mouse 4
  4. Screen Open 0,320,256,2,Lowres : Curs Off 
  5. Locate 0,0
  6. Screen Open 2,704,310,8,Hires : Curs Off 
  7. Screen Display 2,112,40,,
  8. Palette $0,$0,$0
  9. Cls 0
  10. Y#=256.0
  11. X#=320.0
  12. _MODE=$0
  13. MAG#=100
  14. XMIN#=-2.25
  15. XMAX#=0.75
  16. YMIN#=-1.5
  17. YMAX#=1.5
  18. SCRX#=320.0
  19. SCRY#=256.0
  20. _MODE=0
  21. DEPTH=32
  22. LDED=False
  23. If LDED=True
  24.    Screen 2
  25.    Ink 0,, : Bar 0,200 To 704,256
  26.    Locate 0,29 : Centre "Graphics Loaded Into Work Areas"
  27. End If 
  28. If LDED=False
  29.    Screen 2
  30.    Ink 0,, : Bar 0,200 To 704,256
  31.    Locate 0,29 : Centre "No Graphics Loaded Into Work Areas"
  32. End If 
  33. K=31
  34. Global SCRX#,SCRY#,XMIN#,YMIN#,XMAX#,YMAX#,Y#,X#,MAG#,K,_MODE,SCX#,SCY#,DEPTH,LDED
  35. Colour Back 0
  36. MEN
  37. Limit Mouse 
  38. Do 
  39. Loop 
  40. Procedure CALCULATE
  41.    KOLOURS=K+1
  42.    SCX#=SCRX#
  43.    SCY#=SCRY#
  44.    XS#=X#
  45.    YS#=Y#
  46.    Screen Open 0,SCRX#,SCRY#,K+1,_MODE : Curs Off : Flash Off 
  47.    Cls 0
  48.    Screen Open 3,704,24,2,Hires : Curs Off 
  49.    Screen Display 3,112,275,,
  50.    Cls 0 : Palette $0,$FFF
  51.    TMP$="X min:"+Str$(XMIN#)+", X max:"+Str$(XMAX#)
  52.    TMP$=TMP$+", Y min:"+Str$(YMIN#)+", Y max:"+Str$(YMAX#)+", "+Str$(K+1)+" Colours"
  53.    Centre TMP$ : Print 
  54.    TMP$="Re-Iteration Level:"+Str$(MAG#)
  55.    Centre TMP$ : Print 
  56.    TMP$="Screen Size:"
  57.    TMP$=TMP$+Str$(SCRX#)+" x "+Str$(SCRY#)
  58.    If DEPTH=500
  59.       TMP$=TMP$+" Deep Scanning Mode Enabled"
  60.    End If 
  61.    Centre TMP$
  62.    Screen 0
  63.    Hide : Menu Off 
  64.    Y#=SCRY# : X#=SCRX#
  65.    H#=(XMAX#-XMIN#)/(SCRX#-1)
  66.    V#=(YMAX#-YMIN#)/(SCRY#-1)
  67.    LDED=True
  68.    For Q#=0.0 To SCRY#
  69.       For P#=0.0 To SCRX#
  70.          M#=XMIN#+P#*H#
  71.          N#=YMIN#+Q#*V#
  72.          C=0 : X#=0 : Y#=0
  73.          STP2:
  74.          W#=X#*X# : Y2#=Y#*Y# : R#=W#+Y2#
  75.          Y#=2*X#*Y#+N#
  76.          X#=W#-Y2#+M#
  77.          Inc C
  78.          If R#<MAG# and C<DEPTH-1
  79.             Goto STP2
  80.          End If 
  81.          XU=P# : YU=Q#
  82.          C=C and K
  83.          Ink C : Plot XU,YU
  84.          Bchg %1,$BFE001
  85.          If Mouse Key
  86.             Screen Open 4,640,20,2,Hires : Curs Off : Palette $0,$FFF
  87.             Screen Display 4,132,200,,
  88.             Input "Are You You Sure You Want To Abort ";AB$
  89.             If AB$="y"
  90.                Q#=SCRY#+1.0
  91.                P#=SCRX#+1.0
  92.                LDED=False
  93.             End If 
  94.             Screen Close 4
  95.             Screen 0
  96.          End If 
  97.       Next P#
  98.    Next Q#
  99.    Menu On 
  100.    If LDED=True
  101.       Screen 2
  102.       Ink 0,, : Bar 0,200 To 704,256
  103.       Locate 0,29 : Centre "Graphics Loaded Into Work Areas"
  104.    End If 
  105.    If LDED=False
  106.       Screen 2
  107.       Ink 0,, : Bar 0,200 To 704,256
  108.       Locate 0,29 : Centre "No Graphics Loaded Into Work Areas"
  109.    End If 
  110.    Screen To Front 2 : Screen 2
  111.    On Menu On 
  112.    Show 
  113.    SCRX#=SCX#
  114.    SCRY#=SCY#
  115.    Y#=YS#
  116.    X#=XS#
  117. End Proc
  118. Procedure CALCULATEMINIBROT
  119.    KOLOURS=K+1
  120.    SCX#=SCRX#
  121.    SCY#=SCRY#
  122.    XS#=X#
  123.    YS#=Y#
  124.    Screen Open 0,SCRX#,SCRY#,KOLOURS,_MODE : Curs Off : Flash Off 
  125.    ACROSS=(SCRX#/2)-50
  126.    Cls 0
  127.    Screen Open 3,704,30,2,Hires : Curs Off 
  128.    Screen Display 3,112,275,,
  129.    Cls 0 : Palette $0,$FFF
  130.    TMP$="X min:"+Str$(XMIN#)+", X max:"+Str$(XMAX#)
  131.    TMP$=TMP$+", Y min:"+Str$(YMIN#)+", Y max:"+Str$(YMAX#)+", "+Str$(K+1)+" Colours"
  132.    Centre TMP$ : Print 
  133.    TMP$="Re-Iteration Level:"+Str$(MAG#)
  134.    Centre TMP$ : Print 
  135.    TMP$="Preview Screen ( 50 x 50 )"
  136.    If DEPTH=500
  137.       TMP$=TMP$+" Deep Scanning Mode Enabled"
  138.    End If 
  139.    Centre TMP$
  140.    Screen 0
  141.    Hide : Menu Off 
  142.    Y#=SCRY# : X#=SCRX#
  143.    H#=(XMAX#-XMIN#)/(49.0)
  144.    V#=(YMAX#-YMIN#)/(49.0)
  145.    LDED=True
  146.    For Q#=0.0 To 50.0
  147.       For P#=0.0 To 50.0
  148.          M#=XMIN#+P#*H#
  149.          N#=YMIN#+Q#*V#
  150.          C=0 : X#=0 : Y#=0
  151.          LABEL2:
  152.          W#=X#*X# : Y2#=Y#*Y# : R#=W#+Y2#
  153.          Y#=2*X#*Y#+N#
  154.          X#=W#-Y2#+M#
  155.          Inc C
  156.          If R#<MAG# and C<DEPTH-1
  157.             Goto LABEL2
  158.          End If 
  159.          XU=P# : YU=Q#
  160.          C=C and K
  161.          Ink C : Plot ACROSS+XU,120+YU
  162.          Bchg %1,$BFE001
  163.          If Mouse Key
  164.             Screen Open 4,640,20,2,Hires : Curs Off : Palette $0,$FFF
  165.             Screen Display 4,132,200,,
  166.             Input "Are You You Sure You Want To Abort ";AB$
  167.             If AB$="y"
  168.                LDED=False
  169.                Q#=SCRY#+1.0
  170.                P#=SCRX#+1.0
  171.             End If 
  172.             Screen Close 4
  173.             Screen 0
  174.          End If 
  175.       Next P#
  176.    Next Q#
  177.    Menu On 
  178.    On Menu On 
  179.    Show 
  180.    Screen To Front 2
  181.    Screen 2
  182.    SCRX#=SCX#
  183.    SCRY#=SCY#
  184.    Y#=YS#
  185.    X#=XS#
  186.    If LDED=True
  187.       Screen 2
  188.       Ink 0,, : Bar 0,200 To 704,256
  189.       Locate 0,29 : Centre "Graphics Loaded Into Work Areas"
  190.    End If 
  191.    If LDED=False
  192.       Screen 2
  193.       Ink 0,, : Bar 0,200 To 704,256
  194.       Locate 0,29 : Centre "No Graphics Loaded Into Work Areas"
  195.    End If 
  196. End Proc
  197. Procedure SETCOORDS
  198.    If Choice(2)=1
  199.       Screen Open 1,640,24,2,Hires : Cls 0
  200.       Screen Display 1,132,55,,
  201.       Palette $0,$999
  202.       Input "Enter Minimum X Value: ";XMIN#
  203.       Screen Close 1
  204.    End If 
  205.    If Choice(2)=2
  206.       Screen Open 1,640,24,2,Hires : Cls 0
  207.       Screen Display 1,132,55,,
  208.       Palette $0,$999
  209.       Input "Enter Maximum X Value: ";XMAX#
  210.       Screen Close 1
  211.    End If 
  212.    If Choice(2)=3
  213.       Screen Open 1,640,24,2,Hires : Cls 0
  214.       Screen Display 1,132,55,,
  215.       Palette $0,$999
  216.       Input "Enter Minimum Y Value: ";YMIN#
  217.       Screen Close 1
  218.    End If 
  219.    If Choice(2)=4
  220.       Screen Open 1,640,24,2,Hires : Cls 0
  221.       Screen Display 1,132,55,,
  222.       Palette $0,$999
  223.       Input "Enter Maximum Y Value: ";YMAX#
  224.       Screen Close 1
  225.    End If 
  226.    If Choice(2)=5
  227.       Screen Open 1,640,24,2,Hires : Cls 0
  228.       Screen Display 1,132,55,,
  229.       Palette $0,$999
  230.       Input "Enter Re-Iteration Value: ";MAG#
  231.       Screen Close 1
  232.    End If 
  233.    If Choice(2)=6
  234.       Screen Open 1,640,150,2,Hires : Cls 0
  235.       Screen Display 1,132,55,,
  236.       Palette $0,$999
  237.       Input "Enter Re-Iteration Value: ";MAG#
  238.       Input "Enter Minimum X Value: ";XMIN#
  239.       Input "Enter Maximum X Value: ";XMAX#
  240.       Input "Enter Minimum Y Value: ";YMIN#
  241.       Input "Enter Maximum Y Value: ";YMAX#
  242.       Screen Close 1
  243.    End If 
  244.    If Choice(3)=1
  245.       Bell 
  246.       SCRX#=320.0 : SCRY#=256.0
  247.       _MODE=0
  248.       K=31
  249.    End If 
  250.    If Choice(3)=2
  251.       Bell 
  252.       SCRX#=640.0 : SCRY#=256.0
  253.       _MODE=$8000
  254.       K=15
  255.    End If 
  256.    If Choice(3)=3
  257.       Bell 
  258.       SCRX#=352.0 : SCRY#=256.0
  259.       _MODE=0
  260.       K=31
  261.    End If 
  262.    If Choice(3)=4
  263.       Bell 
  264.       SCRX#=704.0 : SCRY#=256.0
  265.       _MODE=$8000
  266.       K=15
  267.    End If 
  268.    If Choice(3)=5
  269.       Bell 
  270.       SCRX#=320.0 : SCRY#=256.0
  271.       _MODE=0
  272.       K=15
  273.    End If 
  274.    If Choice(3)=6
  275.       Bell 
  276.       SCRX#=352.0 : SCRY#=256.0
  277.       _MODE=0
  278.       K=15
  279.    End If 
  280.    Menu On 
  281.    On Menu On 
  282. End Proc
  283. Procedure SETCOLS
  284.    Bell 
  285.    If Choice(2)=1
  286.       Screen 0
  287.       Palette $0,$100,$300,$500,$700,$900,$A00,$C00,$E00,$F00,$F11,$F33,$F55,$F77,$F99,$FBB,$FDD,$FFF,$300,$500,$700,$900,$A00,$C00,$E00,$F00,$F11,$F33,$F55,$F77,$F99
  288.    End If 
  289.    If Choice(2)=2
  290.       Bell 
  291.       Screen 0
  292.       Palette $0,$10,$30,$50,$70,$90,$A0,$C0,$E0,$F0,$1F1,$3F3,$5F5,$7F7,$9F9,$BFB,$DFD,$FFF,$0,$10,$30,$50,$70,$90,$A0,$C0,$E0,$F0,$1F1,$3F3,$5F5
  293.    End If 
  294.    If Choice(2)=3
  295.       Bell 
  296.       Screen 0
  297.       Palette $0,$1,3,5,7,9,$A,$C,$E,$F,$11F,$33F,$55F,$77F,$99F,$BBF,$DDF,$EEF,$0,$1,3,5,7,9,$A,$C,$E,$F,$11F,$33F,$55F
  298.    End If 
  299.    If Choice(2)=4
  300.       Bell 
  301.       Screen 0
  302.       Palette $0,$111,$333,$555,$777,$999,$BBB,$DDD,$FFF,$222,$444,$666,$888,$AAA,$CCC,$EEE,$0,$111,$333,$555,$777,$999,$BBB,$DDD,$FFF,$222,$444,$666,$888,$AAA,$CCC
  303.    End If 
  304.    If Choice(2)=5
  305.       Bell 
  306.       Screen 0
  307.       For A=0 To 30 Step 2
  308.          Colour A,0 : Colour A+1,$FFF
  309.       Next 
  310.    End If 
  311.    If Choice(2)=6
  312.       Bell 
  313.       Screen 0
  314.       Palette $0,2,4,6,9,$B,$D,$F,$FFF,$DDF,$BBF,$99F,$67F,$45F,$22F,$F,$200,$400,$600,$800,$900,$B00,$D00,$F00,$F20,$F40,$F60,$F70,$F90,$FB0,$FD0,$FF0
  315.    End If 
  316.    If Choice(2)=7
  317.       Bell 
  318.       Screen 0
  319.       Palette $0,$FF0,$FC0,$FA0,$F70,$F50,$F20,$0,$FFF,$BDB,$8B8,$595,$373,$151,$30,$10,$100,$300,$511,$733,$955,$B88,$DBB,$FFF,$FFF,$BBD,$88B,$559,$337,$115,$3
  320.    End If 
  321.    If Choice(2)=8
  322.       Bell 
  323.       Screen 0
  324.       Palette $0,$200,$410,$620,$830,$950,$B80,$DB0,$FF0,$DB0,$B80,$950,$830,$620,$410,$200,$400,$510,$720,$840,$A50,$C70,$DA0,$FD0,$DA0,$C70,$A50,$840,$720,$510,$400,$200
  325.    End If 
  326.    If Choice(2)=9
  327.       Bell 
  328.       Screen 0
  329.       If K+1=32
  330.          If CFLAG=True
  331.             Colour 31,$FFF
  332.             CFLAG=False
  333.             Goto OOT
  334.          End If 
  335.          If CFLAG=False
  336.             Colour 31,$0
  337.             CFLAG=True
  338.             Goto OOT
  339.          End If 
  340.       End If 
  341.    End If 
  342.    If K+1=16
  343.       If CFLAG=True
  344.          Colour 15,$FFF
  345.          CFLAG=False
  346.          Goto OOT
  347.       End If 
  348.       If CFLAG=False
  349.          Colour 15,$0
  350.          CFLAG=True
  351.          Goto OOT
  352.       End If 
  353.    End If 
  354.    OOT:
  355.    Screen To Front 2 : Screen 2
  356.    Menu On 
  357.    On Menu On 
  358. End Proc
  359. Procedure QUIT
  360.    If Choice(2)=1
  361.       Screen Hide 0
  362.       Ink 0,, : Bar 0,200 To 704,256
  363.       Screen Open 1,704,256,4,Hires : Flash Off : Curs Off : Cls 0
  364.       Palette $0,$0,$8E : Hide 
  365.       Screen Display 1,112,-100,,
  366.       Screen 1
  367.       Locate 0,0
  368.       Centre "From Scientific Order To Dynamic Chaos."
  369.       Print : Centre " "
  370.       Print : Centre "An Experiment In MandelBrots And Fractal Geometry"
  371.       Print : Centre " "
  372.       Print : Centre "Coded By G.Shilvock & M.Norman (c) 1991"
  373.       Print : Print : Centre "NOTE: The Info Screen WILL NOT affect The Main Screen "
  374.       Print : Centre "The Data will be Plotted Beneath It."
  375.       Print : Print : Centre "- 512k Version -" : Print 
  376.       Print : Print : Centre "Press Mouse Button To Continue."
  377.       For A=40 To 0 Step -1
  378.          Screen Display 2,112,A,,
  379.          Wait Vbl 
  380.       Next 
  381.       For A=-100 To 100 Step 3
  382.          Screen Display 1,112,A,,
  383.          Wait Vbl 
  384.       Next 
  385.       Fade 1 : Wait 15
  386.       Fade 1,$0,$0,$8E : Wait 15
  387.       Repeat 
  388.       Until Mouse Key
  389.       Fade 1 : Wait 15
  390.       Screen Close 1
  391.       For A=0 To 40
  392.          Screen Display 2,112,A,,
  393.          Wait Vbl 
  394.       Next 
  395.       Screen To Front 2 : Screen 2
  396.       Show 
  397.       If LDED=True
  398.          Screen 2
  399.          Ink 0,, : Bar 0,200 To 704,256
  400.          Locate 0,29 : Centre "Graphics Loaded Into Work Areas"
  401.       End If 
  402.       If LDED=False
  403.          Screen 2
  404.          Ink 0,, : Bar 0,200 To 704,256
  405.          Locate 0,29 : Centre "No Graphics Loaded Into Work Areas"
  406.       End If 
  407.    End If 
  408.    If Choice(2)=2
  409.       Dir$="df0:"
  410.       Rem shut down system areas 
  411.       CLI
  412.       End 
  413.    End If 
  414.    If Choice(2)=3
  415.       NAME$=Fsel$("Df0:","","Save IFF File.")
  416.       If NAME$=""
  417.          Goto ABORT
  418.       End If 
  419.       Screen 2 : 
  420.       Ink 0,, : Bar 0,200 To 704,256
  421.       Locate 0,29 : Centre "Saving Data As IFF File."
  422.       Screen To Front 0
  423.       Screen 0
  424.       Change Mouse 6
  425.       Save Iff NAME$,0
  426.       Change Mouse 4
  427.       If LDED=True
  428.          Screen 2
  429.          Ink 0,, : Bar 0,200 To 704,256
  430.          Locate 0,29 : Centre "Graphics Loaded Into Work Areas"
  431.       End If 
  432.       If LDED=False
  433.          Screen 2
  434.          Ink 0,, : Bar 0,200 To 704,256
  435.          Locate 0,29 : Centre "No Graphics Loaded Into Work Areas"
  436.       End If 
  437.       Screen To Front 2 : Screen 2
  438.    End If 
  439.    If Choice(2)=4
  440.       A$="Df0:Iff"
  441.       B$="Df1:Iff"
  442.       C$="Df0:Lo-res"
  443.       D$="Df1:Lo-res"
  444.       Dir$="df0:"
  445.       If Exist(A$)
  446.          Dir$=A$
  447.       End If 
  448.       If Exist(B$)
  449.          Dir$=B$ : Rem check for the existance
  450.       End If 
  451.       If Exist(C$)
  452.          Dir$=C$ : Rem of possible IFF directories
  453.       End If 
  454.       If Exist(D$)
  455.          Dir$=D$
  456.       End If 
  457.       NAME$=Fsel$("","","Load IFF File.")
  458.       If NAME$=""
  459.          Goto ABORT
  460.       End If 
  461.       Screen 2
  462.       Ink 0,, : Bar 0,200 To 704,256
  463.       Locate 0,29 : Centre "Loading Data As IFF File."
  464.       Change Mouse 6
  465.       Load Iff NAME$,0
  466.       Change Mouse 4
  467.       Screen To Front 0
  468.       LDED=True
  469.       If LDED=True
  470.          Screen 2
  471.          Ink 0,, : Bar 0,200 To 704,256
  472.          Locate 0,29 : Centre "Graphics Loaded Into Work Areas"
  473.       End If 
  474.       If LDED=False
  475.          Screen 2
  476.          Ink 0,, : Bar 0,200 To 704,256
  477.          Locate 0,29 : Centre "No Graphics Loaded Into Work Areas"
  478.       End If 
  479.       PASS=False
  480.       Hide 
  481.       Repeat 
  482.          If Mouse Key
  483.             PASS=True
  484.          End If 
  485.          WHICHKEY$=Inkey$
  486.          If WHICHKEY$<>""
  487.             PASS=True
  488.          End If 
  489.       Until PASS=True
  490.       Show 
  491.    End If 
  492.    If Choice(2)=5
  493.       HELP
  494.    End If 
  495.    ABORT:
  496.    Screen Show 0
  497.    Screen To Front 2
  498.    Screen 2
  499.    Menu On 
  500.    On Menu On 
  501. End Proc
  502. Procedure MEN
  503.    Locate 0,0 : Ink 2 : Set Text 6 : Text 0,8,"                   MandelBrot Generator V1.85 (c) 1991 G.Shilvock/M.Norman.                    "
  504.    Set Text 0
  505.    Menu$(1)="   Misc"
  506.    Menu$(1,1)="  About."
  507.    Menu$(1,2)="  Quit.  "
  508.    Menu$(1,3)="  Save IFF File. "
  509.    Menu$(1,4)="  Load IFF File. "
  510.    Menu$(1,5)="  Instructions. "
  511.    Menu$(2)=" Variables"
  512.    Menu$(2,1)=" Set X Min. "
  513.    Menu$(2,2)=" Set X Max. "
  514.    Menu$(2,3)=" Set Y Min. "
  515.    Menu$(2,4)=" Set Y Max. "
  516.    Menu$(2,5)=" Set Re-Iteration Level."
  517.    Menu$(2,6)=" Set All Values.   "
  518.    Menu$(2,7)=" Set Resolution.    "
  519.    Menu$(2,7,1)=" 320 x 256 Low Res  "
  520.    Menu$(2,7,2)=" 640 x 256 High Res "
  521.    Menu$(2,7,3)=" 352 x 256 Low Res Overscan "
  522.    Menu$(2,7,4)=" 704 x 256 High Res Overscan"
  523.    Menu$(2,7,5)=" 320 x 256 Low res 16 Cols. "
  524.    Menu$(2,7,6)=" 352 x 256 Low res 16 Cols. "
  525.    Menu$(3)="  Palettes "
  526.    Menu$(3,1)=" Red      "
  527.    Menu$(3,2)=" Green    "
  528.    Menu$(3,3)=" Blue     "
  529.    Menu$(3,4)=" Grey     "
  530.    Menu$(3,5)=" MonoChrome "
  531.    Menu$(3,6)=" MultiColour 1 "
  532.    Menu$(3,7)=" MultiColour 2 "
  533.    Menu$(3,8)=" Brown    "
  534.    Menu$(3,9)=" Invert Centre "
  535.    Menu$(4)=" Calculate "
  536.    Menu$(4,1)=" Full Screen MandelBrot. "
  537.    Menu$(4,2)=" 50 x 50 Preview. "
  538.    Menu$(5)=" Scan Depth "
  539.    Menu$(5,1)="    Low     "
  540.    Menu$(5,2)="    Deep    "
  541.    Menu$(6)=" Examples "
  542.    Menu$(6,1)=" Example I "
  543.    Menu$(6,2)=" Example II "
  544.    Menu$(6,3)=" Example III "
  545.    Menu$(6,4)=" Example IV "
  546.    Menu$(6,5)=" Example V"
  547.    Menu$(7)=" Display "
  548.    Menu$(7,1)=" View Current "
  549.    On Menu Proc QUIT,SETCOORDS,SETCOLS,CALC,DEEP,EXAMPS,CURRENT
  550.    Menu On 
  551.    On Menu On 
  552.    Screen To Front 2 : Screen 2
  553.    Fade 2,$0,$357,$FFF
  554. End Proc
  555. Procedure CURRENT
  556.    Hide 
  557.    Screen To Front 0 : View 
  558.    Repeat 
  559.    Until Mouse Key
  560.    Show 
  561.    Screen To Front 2
  562.    Menu On 
  563.    On Menu On 
  564. End Proc
  565. Procedure HELP
  566.    Ink 0,, : Bar 0,200 To 704,256
  567.    For A=40 To 0 Step -1
  568.       Screen Display 2,112,A,,
  569.       Wait Vbl 
  570.    Next 
  571.    Fade 1,$357,$FFF,$FFF,$FFF : Wait 15
  572.    Screen Close 0
  573.    Screen Close 2
  574.    Screen Open 1,640,256,2,Hires : Curs Off : Flash Off : Hide 
  575.    Palette $357,$FFF,$0
  576.    Locate 0,0
  577.    Centre "Instructions For MandelBrot Generator"
  578.    Print 
  579.    Centre "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
  580.    Print : Print "This Program was developed using the following books:"
  581.    Print "Our many thanks to the authors for providing "
  582.    Print "us with invaluable background information."
  583.    Print : Print "'The Beauty Of Fractals.' By H.O.Peitgen & P.H. Richter."
  584.    Print "(ISBN 3-540-15851-0) "
  585.    Print "and 'Fractals.' By Jens Feder. (ISBN 0-306-42851-2)"
  586.    Print : Print "This program was coded using AMOS Basic (c) 1990 Mandarin Jawx."
  587.    Print "Thanks to Francois Lionet & Mandarin"
  588.    Print : Print "The menu options on the first menu are all self-explanatary, "
  589.    Print "so those will be skipped." : Print 
  590.    PAWS
  591.    Print 
  592.    Print "The Variables Menu"
  593.    Print "~~~~~~~~~~~~~~~~~~"
  594.    Print "Xmin, Xmax, Ymin, Ymax determine where the 'window' over the MandelBrot"
  595.    Print "will be placed (i.e. Which part of the MandelBrot you will see),"
  596.    Print "And Are Grid Co-Ordinates relative to 0"
  597.    Print "Examples"
  598.    Print "~~~~~~~~"
  599.    Print "Xmin       Xmax      Ymin      Ymax"
  600.    Print "-2.25      0.75      -1.5      1.5"
  601.    Print "-0.19920   -0.12954  1.01480   1.06707"
  602.    Print "-0.713     -0.4082   0.49216   0.71429"
  603.    Print "-1.781     -1.764    0.0       0.013"
  604.    Print : Print : Print 
  605.    PAWS : Print : Print 
  606.    Print "As you can see, all the values are quite close to zero, otherwise"
  607.    Print "the MandelBrot doesn't vary much. The time it takes to compute a full "
  608.    Print "MandelBrot increases with the depth, therefore a basic MandelBrot could take"
  609.    Print "say, 10 Minutes to compute, whereas a MandelBrot computed at very deep levels"
  610.    Print "will be infinitly more complex and beautiful (Brot7.Iff in the "
  611.    Print "IFF Folder on this disk took nearly 16 hours to compute.(Un-compiled version))"
  612.    Print "The Re-Iteration Value is used as a trigger so that a recursive loop"
  613.    Print "doesn't occur. A value of 100 is recommened.)"
  614.    Print "The screen resolution can also be changed, But be warned:- "
  615.    Print "The higher resolutions take quite a while to produce."
  616.    Print "(A HAM Mode Was Originly Included, But Computing time was much to great"
  617.    Print "to justify the end result.)"
  618.    Print "The 'Set All Values' is simply a shortcut from choosing individual menu options "
  619.    Print "if you want to enter a complete set of new data."
  620.    Print "The Palettes Option is used after a MandelBrot has been computed."
  621.    Print "The Invert Centre option is purely cosmetic and is used to "
  622.    Print "invert the middle of the MandelBrot. (some look good with white centres,"
  623.    Print ".....some don't.)"
  624.    Print : Print : Print : Print 
  625.    PAWS
  626.    Print 
  627.    Print "Calculate!"
  628.    Print "~~~~~~~~~~"
  629.    Print "The Calculate option is used to compute a full screen MandelBrot,"
  630.    Print : Print "Use the Preview option to create a smaller version of the"
  631.    Print "MandelBrot ( 50 pixels x 50 pixels.....a wait of 1 - 2 minutes at most )"
  632.    Print "This is to save you having to wait 5 Hours to find you have"
  633.    Print "created a totally black screen."
  634.    Print "If You Choose 'Calculate' or 'Preview' once the program is loaded."
  635.    Print "A Full MandelBrot will be drawn using some pre-sets I have"
  636.    Print "already entered."
  637.    Print "Once a MandelBrot has been drawn the Program returns to the menu."
  638.    Print "Choose 'View Current' to see the MandelBrot  (Mouse Key returns to menu)"
  639.    Print "Depth"
  640.    Print "~~~~~"
  641.    Print "This is a little more complex, because this is how 'detailed' the MandelBrot"
  642.    Print "will be. A 'LOW' setting is faster, but useless at deeper levels, whereas 'DEEP'"
  643.    Print "is very slow but very accurate."
  644.    Print "Try The Co-ordinates on a 'LOW' setting first, and if you get a blank screen,"
  645.    Print "abort the MandelBrot and change to 'DEEP'"
  646.    Print : Print "To use the examples, choose the one you want from the menu, and choose"
  647.    Print "a 'Calcuate' option...(Depth etc are all pre-set.)"
  648.    Print : Print : Print : Print : PAWS : Print 
  649.    Print "Fine Tuning (Only Available on 1 Meg version.)"
  650.    Print "~~~~~~~~~~~"
  651.    Print "Backup - Takes a copy of the current image and copies it to another area"
  652.    Print "Restore - Copies a previously saved image to the current image"
  653.    Print "Zero Area - Does the equivalent of a 'Fill' in colour 0 to"
  654.    Print "black out areas of the MandelBrot."
  655.    Print "The Left button will zero an area, The Right button to finish."
  656.    Print : Print : Print : Print 
  657.    PAWS
  658.    DUN:
  659.    Fade 1 : Wait 45
  660.    Screen Close 1
  661.    Screen Open 0,320,256,2,Lowres : Curs Off : Cls 0
  662.    Locate 0,0
  663.    Screen Open 2,704,310,8,Hires : Curs Off : Cls 0
  664.    Screen Display 2,112,40,,
  665.    Locate 0,0 : Ink 2 : Set Text 6 : Text 0,8,"                   MandelBrot Generator V1.85 (c) 1991 G.Shilvock/M.Norman.                    "
  666.    Set Text 0
  667.    Palette $0,$0,$0
  668.    Screen Show 0
  669.    Menu On 
  670.    On Menu On 
  671.    Fade 1,0,$357,$FFF
  672.    For A=0 To 40
  673.       Screen Display 2,112,A,,
  674.       Wait Vbl 
  675.    Next 
  676.    Screen To Front 2 : Screen 2
  677.    Show 
  678.    If LDED=True
  679.       Screen 2
  680.       Ink 0,, : Bar 0,200 To 704,256
  681.       Locate 0,29 : Centre "Graphics Loaded Into Work Areas"
  682.    End If 
  683.    If LDED=False
  684.       Screen 2
  685.       Ink 0,, : Bar 0,200 To 704,256
  686.       Locate 0,29 : Centre "No Graphics Loaded Into Work Areas"
  687.    End If 
  688. End Proc
  689. Procedure CALC
  690.    If Choice(2)=1
  691.       CALCULATE
  692.    End If 
  693.    If Choice(2)=2
  694.       CALCULATEMINIBROT
  695.    End If 
  696.    Screen To Front 2
  697.    Menu On 
  698.    On Menu On 
  699. End Proc
  700. Procedure DEEP
  701.    If Choice(2)=1
  702.       Bell 
  703.       DEPTH=32
  704.    End If 
  705.    If Choice(2)=2
  706.       Bell 
  707.       DEPTH=500
  708.    End If 
  709.    Menu On 
  710.    On Menu On 
  711.    Screen To Front 2 : Screen 2
  712. End Proc
  713. Procedure EXAMPS
  714.    If Choice(2)=1
  715.       XMIN#=-1.25402
  716.       XMAX#=-1.25286
  717.       YMIN#=0.046251
  718.       YMAX#=0.047125
  719.       DEPTH=500
  720.       Bell 
  721.    End If 
  722.    If Choice(2)=2
  723.       XMIN#=-2.25
  724.       XMAX#=0.75
  725.       YMIN#=-1.5
  726.       YMAX#=1.5
  727.       DEPTH=32
  728.       Bell 
  729.    End If 
  730.    If Choice(2)=3
  731.       XMIN#=-0.746541
  732.       XMAX#=-0.746378
  733.       YMIN#=0.107574
  734.       YMAX#=0.107678
  735.       DEPTH=32
  736.       Bell 
  737.    End If 
  738.    If Choice(2)=4
  739.       XMIN#=-0.1992
  740.       XMAX#=-0.4082
  741.       YMIN#=0.49216
  742.       YMAX#=0.71429
  743.       DEPTH=500
  744.       Bell 
  745.    End If 
  746.    If Choice(2)=5
  747.       XMIN#=-1.781
  748.       XMAX#=-1.764
  749.       YMIN#=0.0
  750.       YMAX#=0.013
  751.       DEPTH=500
  752.       Bell 
  753.    End If 
  754.    Menu On 
  755.    On Menu On 
  756.    Screen To Front 2 : Screen 2
  757. End Proc
  758. Procedure CLI
  759.    Bell 
  760.    Rem shut down system areas 
  761.    Screen Close 0
  762.    Screen 2 : Fade 2 : Wait 45
  763.    Screen Close 2
  764. End Proc
  765. Procedure ABORT
  766.    Bell 
  767.    Rem shut down system areas 
  768.    Screen Close 0
  769.    End 
  770. End Proc
  771. Procedure PAWS
  772.    Locate 0,29 : Centre "Press Any Key To Continue."
  773.    Wait Key 
  774.    Cls 0
  775. End Proc
  776. '
  777. '
  778. '
  779. '
  780. '
  781. '
  782. HANDLE:
  783. Boom 
  784. Screen Open 4,640,16,2,Hires : Palette $0,$0 : Cls 0 : Curs Off 
  785. Screen Display 4,132,200,,
  786. Locate 0,0
  787. Centre "Error! Command Ignored."
  788. Fade 1,$0,$FAC
  789. Wait 200 : Fade 1 : Wait 45 : Screen Close 4
  790. '
  791. ' This is where structured programming goes out the window!  
  792. '
  793. Goto THE_START