Differential drawing¶
Differential drawing analyzers are used to rasterize a two dimensional vector function into a sequence of lines or bezier curves.
Segment¶
Element¶
-
class
pcsg.util.differentialdrawing.Element(minT=0, maxT=1, func=None)¶ Bases:
pcsg.util.differentialdrawing.SegmentA differential drawing element maps a function with a ramge minT .. maxT to a two dimensional position vector. The segment shall be a continiously differentiable curve.
-
func¶ Function to calculate a two dimensional position vector for t.
-
maxT¶ Maximal t passed to function.
-
minT¶ Mininal t passed to function.
-
pointAt(t)¶ Calculates a point for t [0..1] mapped to range [minT..maxT].
-
Path¶
-
class
pcsg.util.differentialdrawing.Path(segments: Optional[list] = None)¶ Path consisting of a list of Segments.
-
appendSegment(segment)¶ Appends a segment to this Path.
-
pointAt(t)¶ Calculates a point for t [0..1].
-
toBezier(initialSegmentCount=10, maxStepSize=0.1, name: Optional[str] = None, attributes: Optional[pcsg.attributes.Attributes] = None)¶ Create a bezier shape from Path.
-
toPolygon(initialSegmentCount=10, maxStepSize=0.1, name: Optional[str] = None, attributes: Optional[pcsg.attributes.Attributes] = None)¶ Create a Polygon from Path.
-