diagrams-lib-0.6.0.2: Embedded domain-specific language for declarative graphics

Maintainer diagrams-discuss@googlegroups.com None

Diagrams.TwoD.Arc

Description

Two-dimensional arcs, approximated by cubic bezier curves.

Synopsis

# Documentation

arc :: (Angle a, PathLike p, V p ~ R2) => a -> a -> pSource

Given a start angle `s` and an end angle `e`, `arc s e` is the path of a radius one arc counterclockwise between the two angles. The origin of the arc is its center.

arc' :: (Angle a, PathLike p, V p ~ R2) => Double -> a -> a -> pSource

Given a radus `r`, a start angle `s` and an end angle `e`, `arc' r s e` is the path of a radius `(abs r)` arc between the two angles. If a negative radius is given, the arc will be clockwise, otherwise it will be counterclockwise. The origin of the arc is its center.

arcCW :: (Angle a, PathLike p, V p ~ R2) => a -> a -> pSource

Like `arc` but clockwise.

arcT :: Angle a => a -> a -> Trail R2Source

Given a start angle `s` and an end angle `e`, `arcT s e` is the `Trail` of a radius one arc counterclockwise between the two angles.

`bezierFromSweep s` constructs a series of `Cubic` segments that start in the positive y direction and sweep counter clockwise through `s` radians. If `s` is negative, it will start in the negative y direction and sweep clockwise. When `s` is less than 0.0001 the empty list results. If the sweep is greater than tau then it is truncated to tau.

wedge :: (Angle a, PathLike p, V p ~ R2) => Double -> a -> a -> pSource

Create a circular wedge of the given radius, beginning at the first angle and extending counterclockwise to the second.