Module Mlpost.MetaPath
MetaPaths: gradually build a path with constraints, get a real path at thxe end.
type direction= Path.directionA
directionis used to put constraints on metapaths:vec pdefines a direction by a point (interpreted as a vector)curl fchanges the curling factor of the extremity of a metapath; higher curling factor means flatter curvesnoDirmeans no particular direction
type knot= Path.knotA
knotis the basic element of a metapath, and is simply a point with an incoming and outgoing direction constraint
val knotp : ?l:direction -> ?r:direction -> Point.t -> knotBuild a knot from a point; the optional arguments are the incoming directions.Warning they are going in the same direction.
type joint= Path.jointA joint is the connection between two knots in a metapath. It is either
jLinefor a straight linejCurvefor a spline curvejCurveNoInflexto avoid inflexion pointsjTension f1 f2to specify "tension" on the joint;jCurveuses a default tension of 1. Higher tension means less "wild" curvesjControls p1 p2to explicitely specify control points
val jLine : jointval jCurve : jointval jCurveNoInflex : jointval jTension : float -> float -> jointval jControls : Point.t -> Point.t -> joint
type path= Path.t
Labelled metapath constructors
val knot : ?l:direction -> ?r:direction -> ?scale:(float -> Num.t) -> (float * float) -> knotBuild a knot from a pair of floats
- parameter l
an incoming direction
- parameter r
an outgoing direction
- parameter scale
a scaling factor applied to the floats
val knotn : ?l:direction -> ?r:direction -> (Num.t * Num.t) -> knotBuild a knot from a Num.t pair; the optional arguments are as in
knot
val path : ?style:joint -> ?scale:(float -> Num.t) -> (float * float) list -> tBuild a metapath from a list of pairs of floats
- parameter style
the joint style used for all joints in the metapath
- parameter cycle
if given, the metapath is closed using the given style
- parameter scale
permits to scale the whole metapath
val jointpathp : Point.t list -> joint list -> tBuild a metapath from
npoints andn-1joints, with default directions
Primitive metapath constructors
Predefined values
val defaultjoint : jointThe default joint style (
JCurve)