Geometry problem (slightly OT)
Geometry problem (slightly OT)
- Subject: Geometry problem (slightly OT)
- From: Graham Cox <email@hidden>
- Date: Tue, 21 Sep 2004 23:46:37 +1000
This has got to be straightforward enough, but it's late, I've had an
18 hour day, and I just can't get my head around it...
Given two rectangles lying at arbitrary angles but crossing over one
another, how do I calculate the four points of the rhomboid
intersection formed? Obviously as the angle becomes closer and closer
to 0, the intersection area extends rapidly to infinity... also the 90°
case is trivial. It can be assumed that the intersection never includes
any corners or ends of the rectangles - in fact they are thick lines
that extend far beyond the area of intersection.
The knowns are:
* A single point representing the centre of the intersection - both
rects are centred widthwise at this point.
* The angle between the rects and their angles on the plane
* The widths of both rects, which can differ
A page with illustrations very much like what I'm trying to convey here
is http://www.cs.unc.edu/~hoff/projects/comp205/proj2/index2.html I
need to find the black area's four corners, as in the upper three
diagrams.
Incidentally is there anything for finding arbitrary intersections,
unions and diffs of paths in Cocoa?
Graham
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden