/* *********************************************************************** * * * The Continuous Potential Method for the Julia Set * * * * Program by * * Christopher D. Watkins * * * * 'C' conversion by * * Larry Sharp * * * *********************************************************************** 125 iterations maximum */ #include "stdio.h" #include "dos.h" #include "conio.h" #include "math.h" #include "string.h" #include "math.inc" #include "graph.inc" #include "render.inc" #define cp -0.12 #define cq 0.74 #define XMin -1.4 #define XMax 1.4 #define YMin -1.4 #define YMax 1.4 #define Iter 32 #define Scal 32767 char ObjF[]="CPMJ1"; /* #define cp 0.31 #define cq 0.04 #define XMin -1.4 #define XMax 1.4 #define YMin -1.4 #define YMax 1.4 #define Iter 32 #define Scal 32767 char ObjF[]="CPMJ2"; */ int Iters; float JSetPot(float p, float q, float cx, float cy, int MaxIter) { float x, y; float x2, y2; float temp; x=cx; x2=SqrFP(x); y=cy; y2=SqrFP(y); Iters=0; while((ItersMax) Max=Height[i][j]; } } for(i=0; i<=MaxRes; i++) { for(j=0; j<=MaxRes; j++) { Height[i][j]=Max-Height[i][j]; } } } /* *********************************************************************** * * * Main Program * * * *********************************************************************** */ void main() { clrscr(); Scaling=32767; Res=MaxRes; InitGraphics(); ClearHeightBuffer(); JSetCPM(Res, Res, Iter, cp, cq, XMin, XMax, YMin, YMax); InverseHeightBuffer(); strcpy(ObjectFile, ObjF); SaveHeightBuffer(ObjectFile); ExitGraphics(); }