Compute the inversion of the arc with respect to the origin.
inv
curves.Arc.inv()
Compute the inversion of the arc with respect to the origin.
Returns
Name
Type
Description
Arc, Ray, or Segment
The type depends on the geometry after inversion
Circle
curves.Circle(a, b=None, c=None, ccw=True)
A circle in the complex plane.
Circles can be constructed in several ways: - From center and radius - From three points on the circle - From a Julia Circle object
Parameters
Name
Type
Description
Default
a
complex or juliacall.AnyValue
Center point, first point on circle, or Julia Circle object
required
b
float or complex
Radius (if a is center) or second point on circle
None
c
complex
Third point on circle (if constructing from three points)
None
ccw
bool
Whether the circle has counterclockwise orientation, default True
True
Attributes
Name
Type
Description
center
complex
Center of the circle
radius
float
Radius of the circle
ccw
bool
Whether the circle has counterclockwise orientation
Examples
>>># Unit circle at origin>>> circle1 = Circle(0, 1)>>># Circle from center and radius with clockwise orientation>>> circle2 = Circle(1+1j, 2, ccw=False)>>># Circle through three points>>> circle3 = Circle(1, 1j, -1)
Compute the inversion of the curve with respect to the origin.
inv
curves.Curve.inv()
Compute the inversion of the curve with respect to the origin.
Returns
Name
Type
Description
Curve
Inverted curve
JuliaCurve
curves.JuliaCurve(julia_obj)
Base class for wrapping Julia curve objects from ComplexRegions.jl.
This class provides a Python interface to Julia curve objects, handling the conversion between Python and Julia types and providing access to geometric operations on curves.
Find the parameter value corresponding to point z on the curve.
Parameters
Name
Type
Description
Default
z
complex
Point to locate on the curve
required
Returns
Name
Type
Description
float or None
Parameter value if z is on the curve, None otherwise
closest
curves.JuliaCurve.closest(z)
Find the closest point on the curve to z.
Parameters
Name
Type
Description
Default
z
complex
Reference point
required
Returns
Name
Type
Description
complex
Closest point on the curve to z
conj
curves.JuliaCurve.conj()
Return the complex conjugate of the curve.
Returns
Name
Type
Description
JuliaCurve
Complex conjugate of this curve
dist
curves.JuliaCurve.dist(z)
Compute the distance from point z to the curve.
Parameters
Name
Type
Description
Default
z
complex
Reference point
required
Returns
Name
Type
Description
float
Distance from z to the closest point on the curve
get
curves.JuliaCurve.get(field)
Get a field from the underlying Julia object.
Parameters
Name
Type
Description
Default
field
str
Name of the field to retrieve
required
Returns
Name
Type
Description
Any
The value of the requested field
intersect
curves.JuliaCurve.intersect(other)
Find intersection points with another curve.
Parameters
Name
Type
Description
Default
other
JuliaCurve
Another curve to intersect with
required
Returns
Name
Type
Description
numpy.ndarray or JuliaCurve
Array of intersection points, or a curve if the intersection is a continuous curve segment
inv
curves.JuliaCurve.inv()
Compute the inversion of the curve with respect to the origin.
Returns
Name
Type
Description
juliacall.AnyValue
Julia object representing the inverted curve
Notes
This method returns a raw Julia object. Subclasses should override this method to return properly wrapped Python objects.
isapprox
curves.JuliaCurve.isapprox(other)
Check if this curve is approximately equal to another.
Parameters
Name
Type
Description
Default
other
JuliaCurve
Another curve to compare with
required
Returns
Name
Type
Description
bool
True if curves are approximately equal, False otherwise
isfinite
curves.JuliaCurve.isfinite()
Check if the curve has finite length.
Returns
Name
Type
Description
bool
True if the curve is finite, False otherwise
isleft
curves.JuliaCurve.isleft(z)
Check if point z is to the left of the curve.
Parameters
Name
Type
Description
Default
z
complex
Point to test
required
Returns
Name
Type
Description
bool
True if z is to the left of the curve, False otherwise
ispositive
curves.JuliaCurve.ispositive()
Check if the curve has positive orientation.
Returns
Name
Type
Description
bool
True if positively oriented, False otherwise
isreal
curves.JuliaCurve.isreal()
Check if the curve lies on the real axis.
Returns
Name
Type
Description
bool
True if the curve is real, False otherwise
isright
curves.JuliaCurve.isright(z)
Check if point z is to the right of the curve.
Parameters
Name
Type
Description
Default
z
complex
Point to test
required
Returns
Name
Type
Description
bool
True if z is to the right of the curve, False otherwise
normal
curves.JuliaCurve.normal(t)
Compute the normal at parameter t.
Parameters
Name
Type
Description
Default
t
float
Parameter value
required
Returns
Name
Type
Description
complex
Normal at parameter t
point
curves.JuliaCurve.point(t)
Evaluate the curve at parameter value t.
Parameters
Name
Type
Description
Default
t
float
Parameter value, typically in [0, 1]
required
Returns
Name
Type
Description
complex
Point on the curve at parameter t
reflect
curves.JuliaCurve.reflect(z)
Reflect point z across the curve.
Parameters
Name
Type
Description
Default
z
complex
Point to reflect
required
Returns
Name
Type
Description
complex
Reflected point
reverse
curves.JuliaCurve.reverse()
Return the curve with reversed orientation.
Returns
Name
Type
Description
JuliaCurve
Curve with reversed orientation
tangent
curves.JuliaCurve.tangent(t=0.0)
Compute the tangent at parameter t.
Parameters
Name
Type
Description
Default
t
float
Parameter value, default is 0
0.0
Returns
Name
Type
Description
complex
Tangent at parameter t
unittangent
curves.JuliaCurve.unittangent(t=0.0)
Compute the unit tangent at parameter t.
Parameters
Name
Type
Description
Default
t
float
Parameter value, default is 0
0.0
Returns
Name
Type
Description
complex
Unit tangent at parameter t
Line
curves.Line(a, b=None, direction=None)
An infinite straight line in the complex plane.
A line can be constructed from two points, or from a point and a direction. Lines have infinite arc length and are always considered to have positive orientation.
Parameters
Name
Type
Description
Default
a
complex or juliacall.AnyValue
Either a point on the line, or a Julia Line object to wrap
required
b
complex
Second point on the line (if constructing from two points)
None
direction
complex
Direction vector of the line (if constructing from point and direction)
None
Attributes
Name
Type
Description
base
complex
A base point on the line
direction
complex
Direction vector of the line
Examples
>>># Line through two points>>> line1 = Line(0, 1+1j)>>># Line through origin with given direction>>> line2 = Line(0, direction=1+1j)