Class SCurve
- java.lang.Object
-
- com.macrofocus.high_d.parallelcoordinates.geometry.curve.SCurve
-
public class SCurve extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static int
DECREASING
static int
INCREASING
static double
TMIN
-
Constructor Summary
Constructors Constructor Description SCurve()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static double
next(double v)
static int
pointCrossingsForCubic(double px, double py, double x0, double y0, double xc0, double yc0, double xc1, double yc1, double x1, double y1, int level)
Calculates the number of times the cubic from (x0,y0) to (x1,y1) crosses the ray extending to the right from (px,py).static int
pointCrossingsForLine(double px, double py, double x0, double y0, double x1, double y1)
Calculates the number of times the line from (x0,y0) to (x1,y1) crosses the ray extending to the right from (px,py).static int
pointCrossingsForPath(java.awt.geom.PathIterator pi, double px, double py)
Calculates the number of times the given path crosses the ray extending to the right from (px,py).static int
pointCrossingsForQuad(double px, double py, double x0, double y0, double xc, double yc, double x1, double y1, int level)
Calculates the number of times the quad from (x0,y0) to (x1,y1) crosses the ray extending to the right from (px,py).static double
prev(double v)
static double
round(double v)
-
-
-
Field Detail
-
INCREASING
public static final int INCREASING
- See Also:
- Constant Field Values
-
DECREASING
public static final int DECREASING
- See Also:
- Constant Field Values
-
TMIN
public static final double TMIN
- See Also:
- Constant Field Values
-
-
Method Detail
-
pointCrossingsForPath
public static int pointCrossingsForPath(java.awt.geom.PathIterator pi, double px, double py)
Calculates the number of times the given path crosses the ray extending to the right from (px,py). If the point lies on a part of the path, then no crossings are counted for that intersection. +1 is added for each crossing where the Y coordinate is increasing -1 is added for each crossing where the Y coordinate is decreasing The return value is the sum of all crossings for every segment in the path. The path must start with a SEG_MOVETO, otherwise an exception is thrown. The caller must check p[xy] for NaN values. The caller may also reject infinite p[xy] values as well.
-
pointCrossingsForLine
public static int pointCrossingsForLine(double px, double py, double x0, double y0, double x1, double y1)
Calculates the number of times the line from (x0,y0) to (x1,y1) crosses the ray extending to the right from (px,py). If the point lies on the line, then no crossings are recorded. +1 is returned for a crossing where the Y coordinate is increasing -1 is returned for a crossing where the Y coordinate is decreasing
-
pointCrossingsForQuad
public static int pointCrossingsForQuad(double px, double py, double x0, double y0, double xc, double yc, double x1, double y1, int level)
Calculates the number of times the quad from (x0,y0) to (x1,y1) crosses the ray extending to the right from (px,py). If the point lies on a part of the curve, then no crossings are counted for that intersection. the level parameter should be 0 at the top-level call and will count up for each recursion level to prevent infinite recursion +1 is added for each crossing where the Y coordinate is increasing -1 is added for each crossing where the Y coordinate is decreasing
-
pointCrossingsForCubic
public static int pointCrossingsForCubic(double px, double py, double x0, double y0, double xc0, double yc0, double xc1, double yc1, double x1, double y1, int level)
Calculates the number of times the cubic from (x0,y0) to (x1,y1) crosses the ray extending to the right from (px,py). If the point lies on a part of the curve, then no crossings are counted for that intersection. the level parameter should be 0 at the top-level call and will count up for each recursion level to prevent infinite recursion +1 is added for each crossing where the Y coordinate is increasing -1 is added for each crossing where the Y coordinate is decreasing
-
round
public static double round(double v)
-
prev
public static double prev(double v)
-
next
public static double next(double v)
-
-