org.gwoptics.graphics.graph2D.traces
Interface ILine2DEquation


public interface ILine2DEquation

This interface should be implemented by objects that are to be represented by a trace on a Graph2D object. The computePoint method is called for each point along the X-Axis and the object implementing the interface is expected to return a double value to plot as the Y-value.

Since:
0.4.0
Author:
Daniel Brown 13/7/09

Method Summary
 double computePoint(double x, int position)
          This method is called for each pixel along the width of a Graph2D object.
 

Method Detail

computePoint

double computePoint(double x,
                    int position)
This method is called for each pixel along the width of a Graph2D object. The x parameter gives the value of the point to be plotted along the horizontal axis. The position parameter states the number of pixels along the axis this value relates to, going from left to right.

Parameters:
X - value
position - pixel
Returns:
Y value to be plotted


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