Reference page for Curve

Contents

Summary

CURVE Class for representing line segments and circle arcs

FIXME Line and curve into separate classes Documentation for Curve doc Curve


PROPERTIES


METHODS

Class methods are listed below. Inherited methods are not included.

Constructor

this = Curve(pstart, pend)

Create a line segment (geo.line) between the Point objects. pstart and pend.

this = Curve(pstart, pcenter, pend)

Create a circle arc (geo.arc) between pstart and pend, centered at pcenter.

this.angle(arguments) Angle between two Curves.

Call syntax

a = c1.*angle*(c2)

a = angle(c1, c2)

Returns the angle a.

Curve/this.center(arguments) is a function.

pc = center(this)

Curve/this.detach(arguments) is a function.

detach(this)

Curve/this.distance_from_point(arguments) is a function.

[d, Pclosest] = distance_from_point(this, P)

Direction of this Curve to join with other curve.

ldir = extend_direction(this, other_curve)

this.extends(arguments) Check if this Curve this.extends(arguments) other curve.

bl = extends(this, other_curve, other_curve_direction)

this.get_xy(arguments) Get xy-coordinates of start- and end-points.

this.joinable_with(arguments) Check if this Curve joins with other Curve.

bl = joinable_with(this, other_line)

bl = true if this shares a point with other_line

Curve/this.next_left(arguments) is a function.

l = next_left(this, P)

this.norm(arguments) Length of Curve.

this.plot(arguments) Plot Curve.

Curve/this.points(arguments) is a function.

X = points(this)

this.rotate(arguments) Rotate around the origin, return a new Curve.

Curve/this.split_with_point(arguments) is a function.

new_curve = split_with_point(this, P)

Curve/this.tangent(arguments) is a function.

t = tangent(this, p)

this.uminus(arguments) Reverse direction, return a new Curve.