Safe Haskell | None |
---|

Combinators for drawing various geometric figures.

- rectangle :: Point -> Point -> Image
- type Length = Scalar
- type Angle = Scalar
- triangle :: Length -> Length -> Length -> Image
- triangleA :: Length -> Length -> Angle -> Image
- triangleAA :: Length -> Angle -> Angle -> Image
- regularPoly :: Int -> Image
- angleArc :: Scalar -> Point -> Point -> Point -> Image
- labelledAngle :: String -> Vec -> Point -> Point -> Point -> Image
- arrow :: Point -> Point -> Image

# Documentation

rectangle :: Point -> Point -> ImageSource

Draw an axis-aligned rectangle with the given opposite corners.

triangle :: Length -> Length -> Length -> ImageSource

Draw a triangle with the given side lengths. The corner opposite the third side is located at the origin and the first side is drawn along the x-axis.

triangleA :: Length -> Length -> Angle -> ImageSource

Draw a triangle given by two side lengths and an angle. The corner of the angle is drawn at the origin and the first side along the x-axis.

triangleAA :: Length -> Angle -> Angle -> ImageSource

Draw a triangle given by two angles and the length of the side shared by the angles. The first angle is drawn at the origin and the side along the x-axis.

regularPoly :: Int -> ImageSource

Draw an n-sided regular polygon centered at the origin and one corner at
`unitY`

.

Draw an angle arc for the counter clockwise angle BAC.

Draw an angle arc labelled by the given string.