|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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));
}
}
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 |
---|
float computePoint(float X, float Y)
X
- Value of X variableY
- Value of Y variable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |