Hi everyone. I have a quick question: Is there anyway that you can check to see if a point lays on an Arc2D object? I'm trying to write a Physics library (or at least part of one), and I noticed that there is no method that does it. You can check to see if the point is inside the curve, but that's not what I need. Is there a class that does that kind of math for you, or will I have to figure it out myself. Which brings me to: Can you retrieve an Array the points that are on an Arc?

Any help in this matter would be greatly appreciated! =)

9 Years
Discussion Span
Last Post by llemes4011

boolean contains(Point2D p)
--- Tests if a specified Point2D is inside the boundary of the Shape.

It is a method of java.awt.geom.RectangularShape , which is super class of Arc2D .


Thank you for your reply. I took that in as meaning "If the point at x,y is within the bounds of the rectangle, this method returns true, else returns false." I'll do a couple tests real quick.

Also. I did some googling and found another "solution". I found an article on Bezier Curves, and made an array that stores the points that are calculated for the curve, and I think that should work too. Also, Bezier Curves are REALLY cool lol.

EDIT: The attachment shows my results of using the .contains method. It doesn't work =S

Edited by llemes4011: n/a

Attachments on_arc_false.JPG 13.7 KB
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.