For the purposes of creating a publication-quality plot marker I wish to convert a font glyph into a simplified Polygon
where points are taken adaptively according to curvature of the boundary. Unfortunately the MaxCellMeasure
option of the built-in BoundaryDiscretizeGraphics
often does the opposite thing: the higher the value of this option, the lesser points it takes in the areas of high curvature but at the same time it keeps large number of points in the areas of low curvature! It is unbelievable but true, look at this (I highlighted the regions with highest curvature by red rectangles):
Table[BoundaryDiscretizeGraphics[
Text[Style["S", FontFamily -> "Verdana", FontWeight -> Bold]], _Text,
MaxCellMeasure -> m, MeshCellStyle -> {0 -> Directive[Black, PointSize[.015]]},
ImageSize -> 300,
Epilog -> {FaceForm[], EdgeForm[{Red, Thick}], Rectangle[{1.7, -2}, {3, -4.5}],
Rectangle[{-1.7, 2}, {-3, 4.5}]}],
{m, .2, 1.2, .4}]
How to obtain an adaptive approximation of a curved shape with a polygon?
Comments
Post a Comment