point in Intersection of square and circle sector

722 Views Asked by At

I want to find random points in intersection of circle sector and square in coordinate system for some computer program.

specification is the square is constant and it's lines are parallel to X and Y axis . but the circle sector is moving in coordinate system. Always i know the bearing angle(angle calculated from North) of each radius of circle sector.

  • Question 1 : I want to check is an intersection exist between circle sector and the square as first step.

  • Question 2 : If the intersection is exist then i should find random points inside intersection.

Attachment: ABCD is the constant square with fix length. O is the center point of circle sector and the position of O is getting change. alfa is the bearing angle and it is variable. 2beta is the center angle of sector. enter image description here