sympathor.elements

class sympathor.elements.SymbolicArc(base)[source]

Bases: sympathor.elements.SymbolicElement, svg.path.path.Arc

length(**kwargs)[source]

The length of an elliptical arc segment requires numerical integration, and in that case it’s simpler to just do a geometric approximation, as for cubic bezier curves.

matrix(a, b, c, d, e, f)[source]
point(s)[source]
class sympathor.elements.SymbolicClose(base)[source]

Bases: sympathor.elements.SymbolicElement, svg.path.path.Close

class sympathor.elements.SymbolicCubicBezier(base)[source]

Bases: sympathor.elements.SymbolicElement, svg.path.path.CubicBezier

length(**kwargs)[source]

Calculate the length of the path up to a certain position

point(s)[source]

Calculate the x,y position at a certain position of the path

class sympathor.elements.SymbolicElement(base, expr_from=None)[source]

Bases: sympathor.elements.SymbolicMixin

arclength(s)[source]
length(**kwargs)[source]
matrix(a, b, c, d, e, f)[source]
rotate(theta, x=0, y=0)[source]
scale(x, y=None)[source]
set_natural_parametrization(set=False)[source]
skewX(theta)[source]
skewY(theta)[source]
translate(dx, dy=0)[source]
class sympathor.elements.SymbolicLine(base)[source]

Bases: sympathor.elements.SymbolicElement, svg.path.path.Line

class sympathor.elements.SymbolicMixin[source]

Bases: object

arclength(s)[source]
class sympathor.elements.SymbolicMove(base)[source]

Bases: sympathor.elements.SymbolicElement, svg.path.path.Move

length(**kwargs)[source]
class sympathor.elements.SymbolicQuadraticBezier(base)[source]

Bases: sympathor.elements.SymbolicElement, svg.path.path.QuadraticBezier

length(**kwargs)[source]
point(s)[source]
sympathor.elements.quadrature(fcn, a, b, N=200)[source]