Skip to main content
replaced http://mathematica.stackexchange.com/ with https://mathematica.stackexchange.com/
Source Link

Here is my attempt to use ParametricPlot for obtaining an adaptive approximation of the shape. It is based on the code of glyph to Polygon conversion engine by Simon Woodsglyph to Polygon conversion engine by Simon Woods. The latter converts BezierCurves directly into BezierFunctions (as BoundaryDiscretizeGraphics doesBoundaryDiscretizeGraphics does) what isn't correct in general since these functions are compatiblecompatible only for BezierCurves of the form BezierCurve[pts, SplineDegree -> Length[pts] - 1]. Happily, it seems that BezierCurves obtained from glyphs always have this property.

Here is my attempt to use ParametricPlot for obtaining an adaptive approximation of the shape. It is based on the code of glyph to Polygon conversion engine by Simon Woods. The latter converts BezierCurves directly into BezierFunctions (as BoundaryDiscretizeGraphics does) what isn't correct in general since these functions are compatible only for BezierCurves of the form BezierCurve[pts, SplineDegree -> Length[pts] - 1]. Happily, it seems that BezierCurves obtained from glyphs always have this property.

Here is my attempt to use ParametricPlot for obtaining an adaptive approximation of the shape. It is based on the code of glyph to Polygon conversion engine by Simon Woods. The latter converts BezierCurves directly into BezierFunctions (as BoundaryDiscretizeGraphics does) what isn't correct in general since these functions are compatible only for BezierCurves of the form BezierCurve[pts, SplineDegree -> Length[pts] - 1]. Happily, it seems that BezierCurves obtained from glyphs always have this property.

deleted 1 character in body
Source Link
Alexey Popkov
  • 62.3k
  • 7
  • 154
  • 375

Here is my attempt to use ParametricPlot for obtaining an adaptive approximation of the shape. It is based on the code of glyphsglyph to Polygon conversion engine by Simon Woods. The latter converts BezierCurves directly into BezierFunctions (as BoundaryDiscretizeGraphics does) what isn't correct in general since these functions are compatible only for BezierCurves of the form BezierCurve[pts, SplineDegree -> Length[pts] - 1]. Happily, it seems that BezierCurves obtained from glyphs always have this property.

Here is my attempt to use ParametricPlot for obtaining an adaptive approximation of the shape. It is based on the code of glyphs to Polygon conversion engine by Simon Woods. The latter converts BezierCurves directly into BezierFunctions (as BoundaryDiscretizeGraphics does) what isn't correct in general since these functions are compatible only for BezierCurves of the form BezierCurve[pts, SplineDegree -> Length[pts] - 1]. Happily, it seems that BezierCurves obtained from glyphs always have this property.

Here is my attempt to use ParametricPlot for obtaining an adaptive approximation of the shape. It is based on the code of glyph to Polygon conversion engine by Simon Woods. The latter converts BezierCurves directly into BezierFunctions (as BoundaryDiscretizeGraphics does) what isn't correct in general since these functions are compatible only for BezierCurves of the form BezierCurve[pts, SplineDegree -> Length[pts] - 1]. Happily, it seems that BezierCurves obtained from glyphs always have this property.

added 25 characters in body
Source Link
Alexey Popkov
  • 62.3k
  • 7
  • 154
  • 375
samples[m_] := Thread[#[Range[0, 1, 1/2^m]]] & /@ Flatten[beziers]

Table[Graphics[
  MapIndexed[{PointSize[.015], Point[#], ColorData[97, #2[[1]]], AbsoluteThickness[1.6], 
     Line[#]} &, Thread[#[Range[0, 1, 1/2^m]]] & /@ Flatten[beziers]]samples[m]], 
  ImageSize -> 300], {m, 0, 2}]
Table[Graphics[
  MapIndexed[{PointSize[.015], Point[#], ColorData[97, #2[[1]]], AbsoluteThickness[1.6], 
     Line[#]} &, Thread[#[Range[0, 1, 1/2^m]]] & /@ Flatten[beziers]], 
  ImageSize -> 300], {m, 0, 2}]
samples[m_] := Thread[#[Range[0, 1, 1/2^m]]] & /@ Flatten[beziers]

Table[Graphics[
  MapIndexed[{PointSize[.015], Point[#], ColorData[97, #2[[1]]], AbsoluteThickness[1.6], 
     Line[#]} &, samples[m]], ImageSize -> 300], {m, 0, 2}]
added 7 characters in body
Source Link
Alexey Popkov
  • 62.3k
  • 7
  • 154
  • 375
Loading
added 1338 characters in body
Source Link
Alexey Popkov
  • 62.3k
  • 7
  • 154
  • 375
Loading
Source Link
Alexey Popkov
  • 62.3k
  • 7
  • 154
  • 375
Loading