Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


Math Forum » Discussions » Software » comp.soft-sys.matlab

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

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Torsten

Posts: 1,449
Registered: 11/8/10
RE: Can matlab determine if a point inside a polygon?
Posted: Jun 21, 2013 2:55 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"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.



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.