Portability | GHC |
---|---|

Stability | highly unstable |

Maintainer | stephen.tetley@gmail.com |

Safe Haskell | Safe-Infered |

Displacing points - often start points.

- type PointDisplace u = Point2 u -> Point2 u
- type ThetaPointDisplace u = Radian -> Point2 u -> Point2 u
- displace :: Num u => Vec2 u -> PointDisplace u
- dispParallel :: Floating u => u -> ThetaPointDisplace u
- dispPerpendicular :: Floating u => u -> ThetaPointDisplace u
- dispOrtho :: Floating u => u -> u -> ThetaPointDisplace u
- dispDirectionTheta :: Floating u => Direction -> u -> ThetaPointDisplace u
- dispCardinalTheta :: Floating u => Cardinal -> u -> ThetaPointDisplace u
- go_up :: Num u => u -> Vec2 u
- go_down :: Num u => u -> Vec2 u
- go_left :: Num u => u -> Vec2 u
- go_right :: Num u => u -> Vec2 u
- go_north :: Num u => u -> Vec2 u
- go_south :: Num u => u -> Vec2 u
- go_east :: Num u => u -> Vec2 u
- go_west :: Num u => u -> Vec2 u
- go_north_east :: Floating u => u -> Vec2 u
- go_north_west :: Floating u => u -> Vec2 u
- go_south_east :: Floating u => u -> Vec2 u
- go_south_west :: Floating u => u -> Vec2 u
- go_up_left :: Num u => u -> Vec2 u
- go_up_right :: Num u => u -> Vec2 u
- go_down_left :: Num u => u -> Vec2 u
- go_down_right :: Num u => u -> Vec2 u
- theta_up :: Floating u => u -> Radian -> Vec2 u
- theta_down :: Floating u => u -> Radian -> Vec2 u
- theta_left :: Floating u => u -> Radian -> Vec2 u
- theta_right :: Floating u => u -> Radian -> Vec2 u
- theta_north :: Floating u => u -> Radian -> Vec2 u
- theta_south :: Floating u => u -> Radian -> Vec2 u
- theta_east :: Floating u => u -> Radian -> Vec2 u
- theta_west :: Floating u => u -> Radian -> Vec2 u
- theta_north_east :: Floating u => u -> Radian -> Vec2 u
- theta_north_west :: Floating u => u -> Radian -> Vec2 u
- theta_south_east :: Floating u => u -> Radian -> Vec2 u
- theta_south_west :: Floating u => u -> Radian -> Vec2 u
- theta_up_left :: Floating u => u -> Radian -> Vec2 u
- theta_up_right :: Floating u => u -> Radian -> Vec2 u
- theta_down_left :: Floating u => u -> Radian -> Vec2 u
- theta_down_right :: Floating u => u -> Radian -> Vec2 u
- theta_adj_grazing :: Floating u => u -> Radian -> Radian -> Vec2 u
- theta_bkwd_adj_grazing :: Floating u => u -> Radian -> Radian -> Vec2 u

# Displacement

type PointDisplace u = Point2 u -> Point2 uSource

`PointDisplace`

is a type representing functions
`from Point to Point`

.

It is especially useful for building composite graphics where one part of the graphic is drawn from a different start point to the other part.

type ThetaPointDisplace u = Radian -> Point2 u -> Point2 uSource

`ThetaPointDisplace`

is a type representing functions
`from Radian * Point to Point`

.

It is useful for building arrowheads which are constructed with an implicit angle representing the direction of the line at the arrow tip.

displace :: Num u => Vec2 u -> PointDisplace uSource

`displace`

: ` Vec2 -> PointDisplace `

Alias for `.+^`

from `Data.AffineSpace`

.

dispParallel :: Floating u => u -> ThetaPointDisplace uSource

`dispParallel`

: ` dist -> ThetaPointDisplace `

Build a combinator to move `Points`

in parallel to the
direction of the implicit angle by the supplied distance
`dist`

.

dispPerpendicular :: Floating u => u -> ThetaPointDisplace uSource

`dispParallel`

: ` dist -> ThetaPointDisplace `

Build a combinator to move `Points`

perpendicular to the
inclnation of the implicit angle by the supplied distance
`dist`

.

dispOrtho :: Floating u => u -> u -> ThetaPointDisplace uSource

`dispOrtho`

: ` vec -> ThetaPointDisplace `

This is a combination of `displaceParallel`

and
`displacePerpendicular`

, with the x component of the vector
displaced in parallel and the y component displaced
perpendicular.

dispDirectionTheta :: Floating u => Direction -> u -> ThetaPointDisplace uSource

*Angular* version of `dispDirection`

.

The displacement direction is with respect to implicit angle of inclination, so:

up == perpendicular down == perdendicular . negate left == parallel . negate right == parallel

dispCardinalTheta :: Floating u => Cardinal -> u -> ThetaPointDisplace uSource

*Angular* version of `dispCardinal`

.

The displacement direction is with respect to implicit angle of inclination, so:

north == perpendicular east == parallel south == perdendicular . negate etc.

# Named vector constructors

go_north_east :: Floating u => u -> Vec2 uSource

go_north_west :: Floating u => u -> Vec2 uSource

go_south_east :: Floating u => u -> Vec2 uSource

go_south_west :: Floating u => u -> Vec2 uSource

go_up_left :: Num u => u -> Vec2 uSource

go_up_right :: Num u => u -> Vec2 uSource

go_down_left :: Num u => u -> Vec2 uSource

go_down_right :: Num u => u -> Vec2 uSource

theta_down :: Floating u => u -> Radian -> Vec2 uSource

theta_left :: Floating u => u -> Radian -> Vec2 uSource

Parallel (reverse)

theta_right :: Floating u => u -> Radian -> Vec2 uSource

Parallel (forward)

theta_north :: Floating u => u -> Radian -> Vec2 uSource

theta_south :: Floating u => u -> Radian -> Vec2 uSource

theta_east :: Floating u => u -> Radian -> Vec2 uSource

theta_west :: Floating u => u -> Radian -> Vec2 uSource

theta_north_east :: Floating u => u -> Radian -> Vec2 uSource

theta_north_west :: Floating u => u -> Radian -> Vec2 uSource

theta_south_east :: Floating u => u -> Radian -> Vec2 uSource

theta_south_west :: Floating u => u -> Radian -> Vec2 uSource

theta_up_left :: Floating u => u -> Radian -> Vec2 uSource

theta_up_right :: Floating u => u -> Radian -> Vec2 uSource

theta_down_left :: Floating u => u -> Radian -> Vec2 uSource

theta_down_right :: Floating u => u -> Radian -> Vec2 uSource