- We using Scaling Transform according to a proper center.
pt is the upper right corner point.
- We draw line from
pt and go to some boundary point qt of the region.
- Extend the line
pt,qt to a point center,and set the center as the center of the scaling transformation.
- The scaling tranformation tranlate the
pt to qt, that is ScalingTransform[{1, 1}*x, center]@pt == qt.
Clear["Global`*"];
reg = BoundaryDiscretizeGraphics[
Text[Style["5", FontFamily -> "Bell MT"]], _Text];
pt = {x, y} /.
Last@NMaximize[{x + y, {x, y} ∈ reg}, {x, y}];
dist = SignedRegionDistance@BoundaryDiscretizeRegion@reg;
dir = AngleVector[-110 Degree];
sol = NDSolve[{r'[s] == dir, r[0] == pt,
WhenEvent[dist[r[s]] == 0, Sow@s]}, r, {s, 0, 20},
MaxStepSize -> .01] // Reap;
index = 4;
s0 = sol[[2, 1]][[index]];
qt = pt + s0*dir;
center = pt + 1.5 (qt - pt);
scalingfactor =
First@SolveValues[ScalingTransform[{1, 1}*x, center]@pt == qt, x,
Reals];
(* scalingfactor=Norm[qt-center]/Norm[pt-center]; *)
Graphics[{RGBColor[0.8, 0.5, 0.0], reg,
ScalingTransform[{1, 1}*scalingfactor, center]@reg,
ScalingTransform[{1, 1}*scalingfactor^2, center]@reg,
ScalingTransform[{1, 1}*scalingfactor^3, center]@
reg, {AbsolutePointSize[8], Red, Point@pt, Point@qt}, {Cyan,
Point[center]}, Cyan, Dashed, Line[{pt, center}]},
Background -> GrayLevel[0.2]]

Region`Mesh`FindSegmentIntersections[......,"ReturnSegmentIndex" -> True, "Ignore" -> {"EndPointsTouching"}]
We can find the intersection of boundary lines and one extra line ,avoid using the NDSolve.
Clear["Global`*"];
reg = BoundaryDiscretizeGraphics[
Text[Style["5", FontFamily -> "Bell MT"]], _Text];
{{x1, x2}, {y1, y2}} = RegionBounds[reg];
pt = {x, y} /.
Last@NMaximize[{x + y, {x, y} ∈ reg}, {x, y}];
dist = SignedRegionDistance@BoundaryDiscretizeRegion@reg;
dir = AngleVector[-110 Degree];
lines = MeshPrimitives[RegionBoundary@reg, 1];
intersections =
Region`Mesh`FindSegmentIntersections[
Join[lines, {Line[{pt, pt + 10*dir}]}],
"ReturnSegmentIndex" -> True, "Ignore" -> {"EndPointsTouching"}];
index = -4;
qt = intersections[[1, index]];
center = pt + 1.5 (qt - pt);
scalingfactor =
First@SolveValues[
ScalingTransform[{1, 1}*scalingfactor, center]@pt == qt,
scalingfactor, Reals];
Graphics[{RGBColor[0.8, 0.5, 0.0], reg,
Lighter[RGBColor[0.8, 0.5, 0.0]], Lighter[RGBColor[0.8, 0.5, 0.0]],
ScalingTransform[{1, 1}*scalingfactor, center]@reg,
Lighter@Lighter[RGBColor[0.8, 0.5, 0.0]],
ScalingTransform[{1, 1}*scalingfactor^2, center]@reg,
ScalingTransform[{1, 1}*scalingfactor^3, center]@
reg, {AbsolutePointSize[8], Red, Point@pt, Point@qt}, {Cyan,
Point[center]}, Cyan, Dashed, Line[{pt, center}],
Text[Style["No.", 30, RGBColor[0.8, 0.5, 0.0]], Scaled[{.36, .4}]]},
Background -> GrayLevel[0.2]]

poem doesn't belong it is for Stack Exchange reasonsI can definitely see the merit and the point you are making. – bmf Dec 19 '23 at 05:22