Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Topic: Can matlab determine if a point inside a polygon?
Replies: 7   Last Post: Jun 21, 2013 3:29 AM

 Messages: [ Previous | Next ]
 Torsten Posts: 1,631 Registered: 11/8/10
RE: Can matlab determine if a point inside a polygon?
Posted: Jun 21, 2013 2:55 AM

"sh " <lolipopkitty@yahoo.com> wrote in message <kq0s92\$8n4\$1@newscl01ah.mathworks.com>...
> Is there any built in function in matlab, for checking if a point is inside an arc section of a circle?
> Thanks,

If you know that the point lies on the circumference of the circle and you only
want to determine wheter it lies inside a certain arc section, you can proceed as follows:
Calculate
theta=atan2((y-y_M)/(x-x_M))
where (x_M,y_M) is the center of the circle and (x,y) is the point in question.
Then compare theta with the angular range of the arc section and decide whether the point lies inside or outside.

Best wishes
Torsten.

Date Subject Author
6/2/10 Sang-Ho Yun
6/3/10 Derek Goring
6/3/10 Walter Roberson
6/3/10 Matt J
11/7/12 Evan00
6/21/13 sh
6/21/13 Torsten
6/21/13 sh