/* K3 SURFACE TRAJECTORIES */

/* Point on surface */
typedef struct {double x, y, z;} point;

/* Function types */
point ix(), iy(), iz(), f(), lift(), rotate(), sym();
double dist(), involute(), norm(), pathlength(), surf();
void init_color_map(), init_surface(), orbit(), random_orbits(), usage(), 
	scan_window(), scan_dim(), setk3(), scan_end(), scan_gray(), 
	scan_set(), ps_colorimage(), printhex(), hlsrgb(), ps_image(),
	patherr(), suberr();

void ps_line(), di(), setsep(), ps_open(), ps_window(), draw_path(), draw_manifold(), ps_close();

int top(), unreal();


/* K3 surface parameters */
#define A 2.0
#define B 2.0

/* Window */
#define CENTERX 0.0
#define CENTERY 0.0
#define CENTER {0.0,0.0}
#define IDIM 900
#define JDIM 900
#define RADIUS 1.2

/* Length of stable manifold to draw */
#define LENGTH 100

/* Iteration limit */
#define ITERLIM 10000

/* Epsilon for Newton convergence */
#define NEWTONEPS 1e-12
#define NEWTONMAX 100		/* Max number of steps */
#define NEWTONCAUTION 1.0	/* Multiple of grad to follow */

/* Subdivisions and point on stable manifold &  */
#define SUBMAX 1000
#define PSMAX 3500000

/* Max separation of points in plot */
#define SEP 0.02

/* Display extra info */
#define VERBOSE 1
