4
$\begingroup$

After calculating the incircle for a triangle, I would like to get the vertex coordinates of the three left-over triangular regions. The additional constraint is that the angle bisectors are at right angles with the yellow lines shown.

SeedRandom[2];
tri = RandomPolygon[{"Convex", 3}]
c = TriangleCenter[tri[[1]], "Incenter"];
r = TriangleMeasurement[tri[[1]], "Inradius"];
d1 = Disk[c, r];

Graphics[{tri, Red, d1
  }
 , Frame -> True
 ]

enter image description here

Thanks for your help.

$\endgroup$

1 Answer 1

7
$\begingroup$
SeedRandom[2];
tri = RandomPolygon[{"Convex", 3}];
c = TriangleCenter[tri[[1]], "Incenter"];
r = TriangleMeasurement[tri[[1]], "Inradius"];
d1 = Disk[c, r];
{a1, b1, c1} = tri[[1]];
a2 = RegionIntersection[Line[{a1, c}], Circle[c, r]][[1, 1]];
b2 = RegionIntersection[Line[{b1, c}], Circle[c, r]][[1, 1]];
c2 = RegionIntersection[Line[{c1, c}], Circle[c, r]][[1, 1]];
Graphics[{tri, Red, d1, Yellow, 
  Point@c, {Yellow, 
   RegionIntersection[InfiniteLine[a2, Cross[a1 - c]], 
     RegionBoundary@tri] /. Point -> Line, 
   RegionIntersection[InfiniteLine[b2, Cross[b1 - c]], 
     RegionBoundary@tri] /. Point -> Line, 
   RegionIntersection[InfiniteLine[c2, Cross[c1 - c]], 
     RegionBoundary@tri] /. Point -> Line}}, Frame -> True]

enter image description here

$\endgroup$
1
  • $\begingroup$ Many thanks @cvgmt. $\endgroup$
    – Syed
    Commented Dec 24, 2023 at 13:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.