package geoml
Install
Dune Dependency
Authors
Maintainers
Sources
md5=37ca15d64a035762d12c4bd7064a1841
sha512=109d7597bd2a8d6628b4c0ee40cd94066fe09ce565bb35fe10683e5f701c1d058daaec79702b4f5f8ed68eeed444c363ca6070f854bbdfb6d0cd997db0f21408
doc/geoml/Line/index.html
Module Line
Source
This module provides basic operation over the linear equation type
printer
error printer
make a b c
builds a line of equation: ax + by + c = 0. Raises an error if a = b = 0.
in which case the equation do not correspond to a line
of_points p1 p2
builds the line that goes through the points p1 and p2. It raises Error(Same_coordinates)
if p1 = p2
is_vertical l
, is true
if l has an equation of the form: x=cst, where cst is a constant float
is_horizontal l, returns true if l has an equation of the form: y=cst, where cst is a constant float
returns a tuple (a,b,c) with respect to the equation of line, as: ax + by \+ c = 0
'x_from_y line y', returns 'x', the value on the x-axis corresponding to given 'y' value, with f the affine function associated to 'line', as: f(x) = y raises Parallel if 'line' doesn't intersect the horizontal line going through 'y'
'y_from_x line x', returns 'y', the value on the y-axis corresponding to given 'x' value, with f the affine function associated to 'line', as: f(x) = y raises Parallel if 'line' doesn't intersect the vertical line going through 'x'
contains l1 p returns true if l1goes through p. false otherwise.
parallel l1 l2 returns true if l1 and l2 are parallel. false otherwise.
intersects l1 l2 returns true if l1 and l2 intersects. false otherwise.
intersection l1 l2 returns the point at the intersection of l1 and l2. It raises Error(Parralel) if l1 and l2 dont intersect
perpendicular l1 l2 returns true if l1 and l2 are perpendicular. false otherwise.
perpendicular_of_line l p returns the line perpendicular to l that goes through p.
parallel_of_line l p returns the line parallel to l that goes through p.
orth_proj l p, returns the orthogonal projection of p on l
point_bissection p1 p2
builds the line l
that bissects the segment p1p2 in its center. It Raises Error(Same_coordinates)
if p1 = p2