package gg

  1. Overview
  2. Docs

Module type Gg.PSource

Implemented by all point types.

Sourcetype t

The type for points.

Sourceval dim : int

dim is the dimension of points of type t.

Sourcetype mh

The type for matrices representing linear transformations of homogenous dim space.

Constructors, accessors and constants

Sourceval o : t

o is the point whose coordinates are all zero.

Functions

Sourceval mid : t -> t -> t

mid p q is the mid point (p + q)/2.

Sourceval tr : mh -> t -> t

tr m p is the affine transform in homogenous dim space of the point p by m.

Note. Since m is supposed to be affine the function ignores the last row of m. p is treated as a finite point (its last coordinate in homogenous space is 1).