Message Boards Message Boards

0
|
3846 Views
|
2 Replies
|
2 Total Likes
View groups...
Share
Share this post:

RegionIntersection of lines and circles

Posted 3 years ago

Hi, I have some Circles and some Lines and I am trying to find their RegionIntersection. See attached notebooks for detail. The Circle is this:

oic = Circle[{0, 0}, 7.5];

The three Lines are these:

ln1 = Line[{{0, 0}, {8, 0}}];
ln2 = Rotate[ln1, Pi/9, {0, 0}];
ln3 = Line[{{0, N[7.5*Sin[Pi/9]]}, {7.5, N[7.5*Sin[Pi/9]]}}]
Line[{0, 2.56515}, {7.5, 2.56515}]

Mathematica has a hard time to find the RegionIntersection of the Circle and the rotated Line. I understand that RegionIntersection can work with just identical Heads. What I do not understand why Graphics is able to deal with the rotated Line and display it correctly but RegionIntersection is not. Any good suggestion for a workaround?

Attachments:
POSTED BY: Janos Lobb
2 Replies
Posted 3 years ago

Thanks a lot, it saves me from some headaches.

POSTED BY: Janos Lobb

Yes, it is very irritating. These versions work:

ln1 = Line[{{0, 0}, {8, 0}}];
RegionIntersection[ln1, Rotate[DiscretizeRegion@ln1, Pi/9, {0, 0}]]
RegionIntersection[ln1, Rotate[Region@ln1, Pi/9, {0, 0}]]
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract