ftp.nice.ch/pub/next/science/mathematics/TotalChaos.1.0.s.tar.gz#/TotalChaos/chaosView.h

This is chaosView.h in view mode; [Download] [Up]

/* Generated by Interface Builder */

#import <appkit/View.h>
#import "Colormap.h"			//won't be needed when init is fixed
#import "chaosControl.h"
#import <math.h>

#define LISTSIZE 1024

void
mulCoords(double *Real1, double *Imagine1, double *Real2, double *Imagine2);

/*Returns coord1 * coord2 in coord1(for imaginary coords)*/
 /* Aux function proves useful ! ! */

@interface chaosView:View
{
    double   myWidth, myHeight;

 /* Width and height of the Chaos coords */
    double   myCenterX, myCenterY;

 /* Center of the Chaos coords */
    int      Depth, chaosColors;

 /* Depth and number of colors */
    double   xFactor, yFactor, twofactor, xsize, ysize, xstep, ystep;

 /*
  * xFactor == yFactor(for mandelbrot) == myWidth / bounds.size.width
  * twofactor tracks current resolution xsize, etc are either == twofactor or
  * twofactor / 2 
  */

    float    currentRow, currentCol;

 /* currentRow and col being plotted(in view coords) */

    id       CVchaosControl;

 /* id of controller for passing stuff */

    id       CVcolorMap;	/* id of map for passing stuff shouldn 't be
				 * needed.  When selection init is fixed won
				 * 't be. */
    NXColor *mycolorMap;	/* List of colors generated by colorMap for
				 * use by colorindex */

}

- gohome:(float *)newX :(float *)newY :(float *)newDX :(float *)newDY :(int *)newDepth;
 /* Returns the x, y, x width, y width, and depth. */

    -(int)colorindex:(double)Real :(double)Imaginary;
 /* Returns the INDEX of the color to plot at the coords. */
 /* EVERYTHING calls this when it wants to plot a point. */

    -drawline;
 /*
  * This is the timed call.It draws one line at the current resolution Calls
  * colorindex.  This is what to modify for non-cartesian plots 
  */

    -examinSelected:(float)realCenter :(float)imagineCenter :(float)realScale :(float)imagineScale :(int)newDepth;
 /*
  * This will show the given area(x, y, width, height, at depth) at the
  * highest resolution. 
  */
 /* Calls colorindex */

    -scrollup;			/* These methods all scroll the view. */
    -scrollright;		/* They shouldn 't need to be changed, I
				 * think. */
    -scrolldown;		/* They could all have been 1 method with a
				 * case, but I 'm lazy, and */
    -scrollleft;		/* Someone might think of a good reason for
				 * them to be separate. */
 /* The corners just call 2 of the scroll methods(yeah, lazy). */
 /* They call fillbox. */

    -startM:(float)XCenter :(float)YCenter :(float)XScale :(float)YScale :(int)ThisDepth;
 /*
  * This is called at the beginning of each plot to tell the view where we're
  * gonna look 
  */

 /*
  * x, y, width, height.  The height will actually be changed to match the
  * width for scale. 
  */

    -fillbox:(NXRect)myRect;
 /* fills myRect at the current resolution.Calls colorindex. */

    -sizeTo:(NXCoord)width :(NXCoord)height;
 /* Obsolete, will be trashed. */

    -setColors:(NXColor *) colorMap :(int)colors :(NXColor) setColor;
 /*
  * Is used to get the new color map from the colormap object.Is called by
  * the colormap. Ought to be called from the controller.  Would fix a bunch
  * of uglies...Later. 
  */

    -getController:sender :map;
 /*
  * Called by the controller when the view is loaded.Passes the
  * instantiations of the controller and map so they can be spoken to by the
  * chaosView. 
  */

    @end

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.