home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Best Objectech Shareware Selections
/
UNTITLED.iso
/
boss
/
grap
/
util
/
010
/
fractalp.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-05-03
|
50KB
|
1,038 lines
/*
This module consists only of the fractalspecific structure
and a *slew* of defines needed to get it to compile
*/
/* includes needed for fractalspecific */
#include <stdio.h>
#include <stdlib.h>
#include "fractint.h"
#include "mpmath.h"
#include "helpdefs.h"
#include "fractype.h"
#include "prototyp.h"
/* functions defined elswhere needed for fractalspecific */
/* moved to prototyp.h */
/* parameter descriptions */
/* Note: parameters preceded by + are integer parameters */
/* for Mandelbrots */
static char realz0[] = "Real Perturbation of Z(0)";
static char imagz0[] = "Imaginary Perturbation of Z(0)";
/* for Julias */
static char realparm[] = "Real Part of Parameter";
static char imagparm[] = "Imaginary Part of Parameter";
/* for Newtons */
static char newtdegree[] = "+Polynomial Degree (>= 2)";
/* for MarksMandel/Julia */
static char exponent[] = "Real part of Exponent";
static char imexponent[] = "Imag part of Exponent";
/* for Complex Newton */
static char realroot[] = "Real part of Root";
static char imagroot[] = "Imag part of Root";
static char realdegree[] = "Real part of Degree";
static char imagdegree[] = "Imag part of Degree";
/* for Lorenz */
static char timestep[] = "Time Step";
/* for formula */
static char p1real[] = "Real portion of p1";
static char p2real[] = "Real portion of p2";
static char p1imag[] = "Imaginary portion of p1";
static char p2imag[] = "Imaginary portion of p2";
/* trig functions */
static char recoeftrg1[] = "Real Coefficient First Function";
static char imcoeftrg1[] = "Imag Coefficient First Function";
static char recoeftrg2[] = "Real Coefficient Second Function";
static char imcoeftrg2[] = "Imag Coefficient Second Function";
/* MCP 7-7-91
static char recoefsqr[] = "Real Coefficient Square Term";
static char imcoefsqr[] = "Imag Coefficient Square Term";
*/
static char recoef2nd[] = "Real Coefficient Second Term";
static char imcoef2nd[] = "Imag Coefficient Second Term";
/* KAM Torus */
static char kamangle[] = "Angle (radians)";
static char kamstep[] = "Step size";
static char kamstop[] = "Stop value";
static char pointsperorbit[] = "+Points per orbit";
/* Newtbasin */
static char stripes[] = "Enter non-zero value for stripes";
/* Gingerbreadman */
static char initx[] = "Initial x";
static char inity[] = "Initial y";
/* popcorn */
static char step[] = "Step size";
/* bifurcations */
static char filt[] = "+Filter Cycles";
static char seed[] = "Seed Population";
/* frothy basins */
static char frothattractor[] = "+3 or 6 attractor system";
static char frothshade[] = "+Enter non-zero value for alternate color shading";
/* symmetrical icon fractals */
static char lambda[] = "Lambda";
static char alpha[] = "Alpha";
static char beta[] = "Beta";
static char gamma[] = "Gamma";
static char omega[] = "Omega";
static char symdegree[] = "+Degree of symmetry";
static char shiftval[] = "Function Shift Value";
/* ifs */
static char color_method[] = "+Coloring method (0,1)";
/* orbit fractals */
static char A[] = "a";
static char B[] = "b";
static char D[] = "d";
/* 4D fractals */
static char C[] = "c";
static char C1[] = "c1";
static char CI[] = "ci";
static char CJ[] = "cj";
static char CK[] = "ck";
static char ZJ[] = "zj";
static char ZK[] = "zk";
/* empty string */
static char ES[] = "";
/* bailout defines */
#define FTRIGBAILOUT 2500.0
#define LTRIGBAILOUT 64.0
#define FROTHBAILOUT 6.0
#define STDBAILOUT 4.0
#define NOBAILOUT 0.0
struct moreparams far moreparams[] =
{
ICON, omega,symdegree,ES,ES,ES,ES,0,3,0,0,0,0,
ICON3D,omega,symdegree,ES,ES,ES,ES,0,3,0,0,0,0,
HYPERCMPLXJFP,ZJ,ZK, ES,ES,ES,ES,0,0,0,0,0,0,
QUATJULFP ,ZJ,ZK, ES,ES,ES,ES,0,0,0,0,0,0,
-1, NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,0,0
};
struct fractalspecificstuff far fractalspecific[] =
{
/*
fractal name, parameter text strings, parameter values,
helptext, helpformula, flags,
xmin xmax ymin ymax int tojulia tomandel tofloat symmetry
|------|-----|-----|-----|--|--------|---------|--------|---------|
orbit fnct per_pixel fnct per_image fnct calctype fcnt bailout
|---------------|---------------|---------------|----------------|-------|
*/
"mandel", realz0, imagz0,ES,ES,0,0,0,0,
HT_MANDEL, HF_MANDEL, WINFRAC,
-2.5, 1.5, -1.5, 1.5, 1, JULIA, NOFRACTAL, MANDELFP, XAXIS_NOPARM,
JuliaFractal, mandel_per_pixel,MandelSetup, StandardFractal, STDBAILOUT,
"julia", realparm, imagparm,ES,ES,0.3,0.6,0,0,
HT_JULIA, HF_JULIA, WINFRAC+OKJB,
-2.0, 2.0, -1.5, 1.5, 1, NOFRACTAL, MANDEL, JULIAFP, ORIGIN,
JuliaFractal, julia_per_pixel, JuliaSetup, StandardFractal, STDBAILOUT,
"*newtbasin", newtdegree,stripes, ES,ES,3,0,0,0,
HT_NEWTBAS, HF_NEWTBAS, WINFRAC,
-2.0, 2.0, -1.5, 1.5, 0, NOFRACTAL, NOFRACTAL, MPNEWTBASIN, NOSYM,
NewtonFractal2, otherjuliafp_per_pixel, NewtonSetup, StandardFractal,NOBAILOUT,
"lambda", realparm, imagparm,ES,ES,0.85,0.6,0,0,
HT_LAMBDA, HF_LAMBDA, WINFRAC+OKJB,
-1.5, 2.5, -1.5, 1.5, 1, NOFRACTAL, MANDELLAMBDA, LAMBDAFP, NOSYM,
LambdaFractal, julia_per_pixel, JulialongSetup, StandardFractal,STDBAILOUT,
"*mandel", realz0, imagz0,ES,ES,0,0,0,0,
HT_MANDEL, HF_MANDEL, WINFRAC,
-2.5, 1.5, -1.5, 1.5, 0, JULIAFP, NOFRACTAL, MANDEL, XAXIS_NOPARM,
JuliafpFractal,mandelfp_per_pixel, MandelfpSetup, StandardFractal, STDBAILOUT,
"*newton", newtdegree, ES, ES,ES,3,0,0,0,
HT_NEWT, HF_NEWT, WINFRAC,
-2.0, 2.0, -1.5, 1.5, 0, NOFRACTAL, NOFRACTAL, MPNEWTON, XAXIS,
NewtonFractal2, otherjuliafp_per_pixel, NewtonSetup, StandardFractal,NOBAILOUT,
"*julia", realparm, imagparm,ES,ES,0.3,0.6,0,0,
HT_JULIA, HF_JULIA, WINFRAC+OKJB,
-2.0, 2.0, -1.5, 1.5, 0, NOFRACTAL, MANDELFP, JULIA, ORIGIN,
JuliafpFractal, juliafp_per_pixel, JuliafpSetup, StandardFractal,STDBAILOUT,
"plasma", "Graininess Factor (.1 to 50, default is 2)",
"+Algorithm (0 = original, 1 = new)",
"+Random Seed Value (0 = Random, 1 = Reuse Last)",
"+Save as Pot File? (0 = No, 1 = Yes)",
2,0,0,0,
HT_PLASMA, HF_PLASMA, NOZOOM+NOGUESS+NOTRACE+NORESUME+WINFRAC,
-2.0, 2.0, -1.5, 1.5, 1, NOFRACTAL, NOFRACTAL, NOFRACTAL, NOSYM,
NULL, NULL, StandaloneSetup, plasma, NOBAILOUT,
"*mandelfn", realz0, imagz0,ES,ES,0,0,0,0,
HT_MANDFN, HF_MANDFN, TRIG1+WINFRAC,
-8.0, 8.0, -6.0, 6.0, 0, LAMBDATRIGFP,NOFRACTAL, MANDELTRIG, XYAXIS_NOPARM,
LambdaTrigfpFractal,othermandelfp_per_pixel,MandelTrigSetup,StandardFractal,LTRIGBAILOUT,
"*manowar", realz0, imagz0,ES,ES,0,0,0,0,
HT_SCOTSKIN, HF_MANOWAR, WINFRAC,
-2.5, 1.5, -1.5, 1.5, 0, MANOWARJFP, NOFRACTAL, MANOWAR, XAXIS_NOPARM,
ManOWarfpFractal,mandelfp_per_pixel, MandelfpSetup,StandardFractal,STDBAILOUT,
"manowar", realz0, imagz0,ES,ES,0,0,0,0,
HT_SCOTSKIN, HF_MANOWAR, WINFRAC,
-2.5, 1.5, -1.5, 1.5, 1, MANOWARJ, NOFRACTAL, MANOWARFP, XAXIS_NOPARM,
ManOWarFractal,mandel_per_pixel, MandellongSetup,StandardFractal,STDBAILOUT,
"test","(testpt Param #1)","(testpt param #2)","(testpt param #3)","(testpt param #4)",0,0,0,0,
HT_TEST, HF_TEST, 0,
-2.0, 2.0, -1.5, 1.5, 0, NOFRACTAL, NOFRACTAL, NOFRACTAL, NOSYM,
NULL, NULL, StandaloneSetup, test, STDBAILOUT,
"sierpinski", ES,ES,ES,ES,0,0,0,0,
HT_SIER, HF_SIER, WINFRAC,
-0.9, 1.7, -0.9, 1.7, 1, NOFRACTAL, NOFRACTAL, SIERPINSKIFP, NOSYM,
SierpinskiFractal,long_julia_per_pixel, SierpinskiSetup,StandardFractal,127.0,
"barnsleym1", realz0, imagz0,ES,ES,0,0,0,0,
HT_BARNS, HF_BARNSM1, WINFRAC,
-2.0, 2.0, -1.5, 1.5, 1, BARNSLEYJ1,NOFRACTAL, BARNSLEYM1FP, XYAXIS_NOPARM,
Barnsley1Fractal,long_mandel_per_pixel,MandellongSetup,StandardFractal,STDBAILOUT,
"barnsleyj1", realparm, imagparm,ES,ES,0.6,1.1,0,0,
HT_BARNS, HF_BARNSJ1, WINFRAC+OKJB,
-2.0