Class ComplexCanvas

All Implemented Interfaces:
ComponentListener, KeyListener, MouseListener, MouseMotionListener, MouseWheelListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible

public class ComplexCanvas extends AbstractCanvas
Canvas used by the ComplexPlotter applet.
See Also:
  • Field Details

    • jep

      protected final Jep jep
      Math parser
    • zExpression

      protected Node zExpression
      Expression to evaluate
    • z

      protected final Variable z
      "z" variable
  • Constructor Details

    • ComplexCanvas

      public ComplexCanvas(Jep jep, Variable z, double rVal, double min, double max, int steps)
      Parameters:
      jep - The Jep instance
      z - A Variable object holding the parameter
      rVal - initial value for "r"
      min - minimum value for theta parameter
      max - maximum value for theta parameter
      steps - number of line segments to draw
  • Method Details

    • getZExpression

      public Node getZExpression()
    • setZExpression

      public void setZExpression(Node zExpr)
    • getTMin

      public double getTMin()
    • getTMax

      public double getTMax()
    • getTSteps

      public int getTSteps()
    • getrVal

      public double getrVal()
    • setrVal

      public void setrVal(double rVal)
    • setRange

      public void setRange(double min, double max, int steps)
    • getFValue

      protected Complex getFValue(double rValue, double tValue)
      Returns:
      The value of the function at an x value of the parameter. NaN on errors
    • paintCurve

      protected void paintCurve(Graphics g)
      Paints the graph of the function. A null argument cause the values to be dumped to stdout.
      Specified by:
      paintCurve in class AbstractCanvas
    • rescaled

      public void rescaled()
      Description copied from class: AbstractCanvas
      Called when scale or offset changed Default action is to call repaint
      Overrides:
      rescaled in class AbstractCanvas
    • dump

      public void dump()
      Dump the coordinates on the standard output
      Specified by:
      dump in class AbstractCanvas
    • getNumPts

      protected long getNumPts()
      Description copied from class: AbstractCanvas
      The number of points which are calculated
      Specified by:
      getNumPts in class AbstractCanvas
      Returns:
      the number of points