Search in sources :

Example 1 with Double

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;
}
Also used : Double(java.awt.geom.Point2D.Double)

Example 2 with Double

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]);
    }
}
Also used : Double(java.awt.geom.Point2D.Double) Point(java.awt.Point) ThreadLocalComplex(arblib.ThreadLocalComplex) Complex(arblib.Complex)

Example 3 with Double

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));
}
Also used : Double(java.awt.geom.Point2D.Double)

Example 4 with Double

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;
}
Also used : Double(java.awt.geom.Point2D.Double)

Example 5 with Double

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;
}
Also used : Double(java.awt.geom.Point2D.Double)

Aggregations

Double (java.awt.geom.Point2D.Double)20 Point2D (java.awt.geom.Point2D)5 Complex (arblib.Complex)2 Projector (com.github.davidmoten.grumpy.projection.Projector)2 ProjectorBounds (com.github.davidmoten.grumpy.projection.ProjectorBounds)2 ProjectorTarget (com.github.davidmoten.grumpy.projection.ProjectorTarget)2 Color (java.awt.Color)2 Shape (java.awt.Shape)2 AffineTransform (java.awt.geom.AffineTransform)2 Ellipse2D (java.awt.geom.Ellipse2D)2 Path2D (java.awt.geom.Path2D)2 Attributes (org.dcm4che3.data.Attributes)2 Test (org.junit.Test)2 Point (org.locationtech.jts.geom.Point)2 Graphic (org.weasis.core.ui.model.graphic.Graphic)2 NonEditableGraphic (org.weasis.core.ui.model.graphic.imp.NonEditableGraphic)2 PointGraphic (org.weasis.core.ui.model.graphic.imp.PointGraphic)2 EllipseGraphic (org.weasis.core.ui.model.graphic.imp.area.EllipseGraphic)2 PolygonGraphic (org.weasis.core.ui.model.graphic.imp.area.PolygonGraphic)2 PolylineGraphic (org.weasis.core.ui.model.graphic.imp.line.PolylineGraphic)2