jord-2.0.0.0: Geographical Position Calculations
Copyright(c) 2020 Cedric Liegeois
LicenseBSD3
MaintainerCedric Liegeois <ofmooseandmen@yahoo.fr>
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Geo.Jord.Triangle

Description

Types and functions for working with triangles at the surface of a spherical celestial body.

In order to use this module you should start with the following imports:

import qualified Data.Geo.Jord.Geodetic as Geodetic
import qualified Data.Geo.Jord.Triangle as Triangle
Synopsis

Documentation

data Triangle a Source #

A triangle whose vertices are horizontal geodetic positions.

Instances

Instances details
Model a => Eq (Triangle a) Source # 
Instance details

Defined in Data.Geo.Jord.Triangle

Methods

(==) :: Triangle a -> Triangle a -> Bool #

(/=) :: Triangle a -> Triangle a -> Bool #

Model a => Show (Triangle a) Source # 
Instance details

Defined in Data.Geo.Jord.Triangle

Methods

showsPrec :: Int -> Triangle a -> ShowS #

show :: Triangle a -> String #

showList :: [Triangle a] -> ShowS #

vertex0 :: Spherical a => Triangle a -> HorizontalPosition a Source #

First vertex of given triangle.

vertex1 :: Spherical a => Triangle a -> HorizontalPosition a Source #

Second vertex of given triangle.

vertex2 :: Spherical a => Triangle a -> HorizontalPosition a Source #

Third vertex of given triangle.

make :: Spherical a => HorizontalPosition a -> HorizontalPosition a -> HorizontalPosition a -> Maybe (Triangle a) Source #

Triangle from given vertices. Returns Nothing if some vertices are equal or some are antipodes of others.

unsafeMake :: Spherical a => HorizontalPosition a -> HorizontalPosition a -> HorizontalPosition a -> Triangle a Source #

Triangle from given vertices. This is unsafe, if any vertices are equal or some are antipodes of others, the resulting triangle is actually undefined.

centroid :: Spherical a => Triangle a -> HorizontalPosition a Source #

Computes the centroid of the given triangle: the position which is the intersection of the three medians of the triangle (each median connecting a vertex with the midpoint of the opposite side).

The centroid is always within the triangle.

circumcentre :: Spherical a => Triangle a -> HorizontalPosition a Source #

The circumcentre of the triangle: the position which is equidistant from all three vertices.

The circumscribed circle or circumcircle of a triangle is a circle which passes through all the vertices of the triangle; The circumcentre is not necessarily inside the triangle.

Thanks to STRIPACK: http://orion.math.iastate.edu/burkardt/f_src/stripack/stripack.f90

contains :: Spherical a => Triangle a -> HorizontalPosition a -> Bool Source #

contains t p returns True if position p is enclosed by the vertices of triangle t - see enclosedBy.