Library
Module
Module type
Parameter
Class
Class type
type direction = Path.direction
A direction
is used to put constraints on metapaths:
vec p
defines a direction by a point (interpreted as a vector)curl f
changes the curling factor of the extremity of a metapath; higher curling factor means flatter curvesnoDir
means no particular direction
val curl : float -> direction
val noDir : direction
type knot = Path.knot
A knot
is the basic element of a metapath, and is simply a point with an incoming and outgoing direction constraint
Build a knot from a point; the optional arguments are the incoming directions.Warning they are going in the same direction.
type joint = Path.joint
A joint is the connection between two knots in a metapath. It is either
jLine
for a straight linejCurve
for a spline curvejCurveNoInflex
to avoid inflexion pointsjTension f1 f2
to specify "tension" on the joint;jCurve
uses a default tension of 1. Higher tension means less "wild" curvesjControls p1 p2
to explicitely specify control points
val jLine : joint
val jCurve : joint
val jCurveNoInflex : joint
val jTension : float -> float -> joint
type path = Path.t
In all the functions below :
- noDir is the default direction
- jCurve is the default joint
Labelled metapath constructors
Build a knot from a pair of floats
Build a knot from a Num.t pair; the optional arguments are as in knot
Build a metapath from a list of pairs of floats
Build a metapath from n
points and n-1
joints, with default directions
Build a metapath from n
float_pairs and n-1
joints, with default directions
Close a metapath using direction dir
and style style
Primitive metapath constructors
Predefined values
val defaultjoint : joint
The default joint style (JCurve
)
Conversions
Compute the control point of the path for a good looking result according to the constraint on the direction, tension, curve