public class NearestPoint extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
main(String[] args)
Test for onCurve
|
static double |
onCurve(CubicCurve2D c,
Point2D pa,
Point2D pn)
Return the nearest point (pn) on cubic bezier curve c nearest to point
pa.
|
static double |
onLine(Point2D p1,
Point2D p2,
Point2D pa,
Point2D pn)
Returns the nearest point (pn) on line p1 - p2 nearest to point pa.
|
public static double onLine(Point2D p1, Point2D p2, Point2D pa, Point2D pn)
p1 - start point of linep2 - end point of linepa - arbitrary pointpn - nearest point (return param)public static double onCurve(CubicCurve2D c, Point2D pa, Point2D pn)
c - cubice curvepa - arbitrary pointpn - nearest point found (return param)public static void main(String[] args)
Copyright © 1996-2014 FreeHEP. All Rights Reserved.