public class Projections extends Object
| Modifier and Type | Method and Description |
|---|---|
static double |
computeRelativeProjectionLocation(double x0,
double y0,
double x1,
double y1,
double x,
double y)
Computes the relative location of the projection of the point (x,y)
on the line (x0,y0)-(x1,y1).
|
static Point2D |
dropPerpendicular(double x0,
double y0,
double x1,
double y1,
double x,
double y,
Point2D result)
Drop the perpendicular on the line (x0,y0)-(x1,y1) from the point (x,y)
and store the result in the given point and return it.
|
static Point2D |
dropPerpendicular(Line2D line,
Point2D p,
Point2D result)
Drop the perpendicular on the line from the point p and store
the result in the given point and return it.
|
static Point2D |
dropPerpendicular(Point2D p0,
Point2D p1,
Point2D p,
Point2D result)
Drop the perpendicular on the line p0-p1 from the point p
and store the result in the given point and return it.
|
public static Point2D dropPerpendicular(Line2D line, Point2D p, Point2D result)
null, then a new point will be created
and returnedline - The linep - The point to drop fromresult - The point that will store the resultpublic static Point2D dropPerpendicular(Point2D p0, Point2D p1, Point2D p, Point2D result)
null, then a new
point will be created and returnedp0 - The start point of the linep1 - The end point of the linep - The point to drop fromresult - The point that will store the resultpublic static Point2D dropPerpendicular(double x0, double y0, double x1, double y1, double x, double y, Point2D result)
null, then a new point will be created
and returnedx0 - The x-coordinate of the start point of the liney0 - The y-coordinate of the start point of the linex1 - The x-coordinate of the end point of the liney1 - The y-coordinate of the end point of the linex - The x-coordinate of the point to drop fromy - The y-coordinate of the point to drop fromresult - The point that will store the resultpublic static double computeRelativeProjectionLocation(double x0,
double y0,
double x1,
double y1,
double x,
double y)
x0 - The x-coordinate of the start point of the liney0 - The y-coordinate of the start point of the linex1 - The x-coordinate of the end point of the liney1 - The y-coordinate of the end point of the linex - The x-coordinate of the point to drop fromy - The y-coordinate of the point to drop fromCopyright © 2017. All rights reserved.