This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Other JSE/JEE APIs and the fly likes finding closest point Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Reply locked New topic
Author

finding closest point

Yundi Li, Daniel
Greenhorn

Joined: Sep 24, 2002
Posts: 26
i wanna implement a operation that calculate a closest point to a Line from one point.
the signature of the operation should be
public Point getClosestPoint(Point p1, Point p2, Point target);
the point 1 and point 2 form a line , the method should return a point on the line that is closest to the target.
I just use some stupid method to do that.
Anyone have smart algoirthem or method to do it ?
Thanks for your help
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
Please don't post the same question in multiple forums - other posters may waste their time replying to something that has already been answered elsewhere. Continue the discussion here. Thanks.


"I'm not back." - Bill Harding, Twister
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: finding closest point
 
Similar Threads
finding closest point
Yiphee ! I created a MBean, Now What ???? (Tomcat 5.5)
about object reference ?
How you guys handle exception?
Technique for same fragment shown in multiple tabs