use of java.awt.geom.Point2D.Double in project arb4j by crowlogic.
the class ComplexFunctionPlotter method mapFunctionToScreen.
public Double mapFunctionToScreen(Double cursor2) {
assert cursor2 != null;
Double dest = new Point2D.Double();
getFunctionSpaceCoordinates().transform(cursor2, dest);
return dest;
}
use of java.awt.geom.Point2D.Double in project arb4j by crowlogic.
the class ComplexFunctionPlotter method drawNewtonTrajectory.
/**
* draw a tangent line thru the cursor position
*/
protected synchronized void drawNewtonTrajectory() {
if (trajectory == null) {
return;
}
Double[] points = new Double[trajectory.dim];
for (int i = 0; i < trajectory.dim; i++) {
Complex x = trajectory.get(i);
points[i] = mapFunctionToScreen(x);
}
for (int i = 0; i < trajectory.dim - 1; i++) {
drawLine(dynamicOverlayGraphics, points[i], points[i + 1]);
}
}
use of java.awt.geom.Point2D.Double in project arb4j by crowlogic.
the class ComplexFunctionPlotter method markVerticalTick.
private void markVerticalTick(double y) {
drawLine(staticOverlayGraphics, new Double(-0.1, y), new Double(0.1, y));
drawLine(staticOverlayGraphics, new Double(-0.1, -y), new Double(0.1, -y));
}
use of java.awt.geom.Point2D.Double in project arb4j by crowlogic.
the class ComplexFunctionPlotter method mapFunctionToScreen.
public Double mapFunctionToScreen(Complex a) {
Double src = new Point2D.Double(a.getReal().doubleValue(), a.getImag().doubleValue());
Double dest = new Point2D.Double();
getFunctionSpaceCoordinates().transform(src, dest);
return dest;
}
use of java.awt.geom.Point2D.Double in project arb4j by crowlogic.
the class ComplexFunctionPlotter method mapScreenToFunction.
public Double mapScreenToFunction(Point point) {
Double dest = new Point2D.Double();
getScreenToFunctionDomainMapping().transform(point, dest);
return dest;
}
Aggregations