org.gwoptics.graphics.graph3D
Interface IGraph3DCallback


public interface IGraph3DCallback

IGraph3DCallback specifies a function computePoint() that represents the equation of a surface on a graph. This interface is for use with the SurfaceGraph3D control and its various components. The computerPoint function defines the equation of a surface using the X and Y components, Z being the up direction.

IGraph3DCallback can be used to either generate a quick function or be implemented by a new class to add changeable variables.

 Example of standing wave class using the IGraph3DCallback interface.
 t, k and w can all be varied to produce different results.
 
   class standingWave implements IGraph3DCallback{
                float t;
                float k;
                float w;
                public float computePoint(float X, float Y) {
                        return (float) (Math.cos(w*t) * Math.sin(k*X) * Math.sin(k*Y));
                }
        }
 
 

Since:
0.1.1
Author:
Daniel Brown 8/6/09
See Also:
SurfaceGraph3D, SurfaceTrace3D

Method Summary
 float computePoint(float X, float Y)
          This function returns the result of an equation for a surface using 2 variable X and Y.
 

Method Detail

computePoint

float computePoint(float X,
                   float Y)
This function returns the result of an equation for a surface using 2 variable X and Y.

Parameters:
X - Value of X variable
Y - Value of Y variable
Returns:
Equation output


processing library gwoptics by Daniel Brown and Andreas Freise. (c) 2009 onwards