| 1 | C APFELMAENNCHEN-PROGRAMM, 02.APRIL.2006 PHILIPP HACHTMANN |
| 2 | C INTERMEDIATE VERSION |
| 3 | C |
| 4 | C THIS VERSION SHOULD RUN A BIT FASTER BECAUSE THE SQUARE |
| 5 | C ROOT IS OMMITTED. |
| 6 | C |
| 7 | C SWITCH SETTINGS: |
| 8 | C SENSE-SWITCH 1: IF SET, ASK FOR PARAMETERS |
| 9 | C SENSE-SWITCH 2: IF SET, DON'T PRINT PARAMETERS ON START |
| 10 | C SENSE-SWITCH 3: IF SET, RESTORE PARAMETERS TO DEFAULT VALUES |
| 11 | C |
| 12 | CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
| 13 | C COMMON BLOCK DECLARATIONS |
| 14 | C |
| 15 | INTEGER MAXI,WIDTH,CR,LF,POSI,NEGA |
| 16 | COMMON /PARAM2/MAXI,WIDTH,CR,LF,POSI,NEGA |
| 17 | C |
| 18 | REAL LOWX,LOWY,HIGHX,HIGHY,MAXVAL,XSTEP,YSTEP |
| 19 | COMMON /PARAM1/LOWX,LOWY,HIGHX,HIGHY,MAXVAL,XSTEP,YSTEP |
| 20 | C |
| 21 | INTEGER INIT |
| 22 | COMMON /PARAM3/INIT |
| 23 | C |
| 24 | INTEGER PBUFF |
| 25 | DIMENSION PBUFF(4000) |
| 26 | C |
| 27 | CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
| 28 | C START MESSAGE |
| 29 | 100 WRITE (4,10) |
| 30 | 10 FORMAT (48H MANDELBROT-DEMO 3RC1) XX.XX.2009, PH. HACHTMANN) |
| 31 | C |
| 32 | C |
| 33 | CALL CLRPLT(4096,PBUFF) |
| 34 | C |
| 35 | CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
| 36 | C CONFIGURATION |
| 37 | CCCCCC RESET DO DEFAULT VALUES? |
| 38 | C 110 CALL RSW(9,I) |
| 39 | IF (I.EQ.1) CALL RST |
| 40 | CALL RST |
| 41 | C |
| 42 | CCCCCC ON THE FIRST START OR IF DESIRED |
| 43 | IF(INIT.EQ.0) CALL STVAL |
| 44 | C |
| 45 | CCCCCC DO WE HAVE TO ASK FOR PARAMETERS? |
| 46 | CALL RSW(10,I) |
| 47 | IF (I.EQ.1) CALL GETCFG |
| 48 | C |
| 49 | CCCCCC OUTPUT SETTINGS? |
| 50 | CALL RSW(11,I) |
| 51 | IF(I.EQ.0) CALL OUTCFG |
| 52 | C |
| 53 | WRITE (4,55) |
| 54 | 55 FORMAT (1H0) |
| 55 | C |
| 56 | CALL CALC2 |
| 57 | C |
| 58 | WRITE (4, 60) |
| 59 | 60 FORMAT (6H READY) |
| 60 | C |
| 61 | CCCCCC BREAK WITH 7 in A REG, THEN START OVER |
| 62 | C CALL PWAIT |
| 63 | 666 R=3.76567 |
| 64 | A=4543.33*R*R+4.1 |
| 65 | V=A/3.456 |
| 66 | GO TO 666 |
| 67 | PAUSE 7 |
| 68 | GO TO 100 |
| 69 | END |
| 70 | C END OF MAIN PROGRAM |
| 71 | C |
| 72 | CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
| 73 | C |
| 74 | CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
| 75 | C |
| 76 | C |
| 77 | C |
| 78 | $0 |