ProjGeom 1.0.11
Loading...
Searching...
No Matches
Public Member Functions | List of all members
fun::persp_euclid_plane< Point, Line > Class Template Reference

Perspective-Euclidean plane class. More...

#include <persp_plane.hpp>

Inheritance diagram for fun::persp_euclid_plane< Point, Line >:
Inheritance graph
[legend]
Collaboration diagram for fun::persp_euclid_plane< Point, Line >:
Collaboration graph
[legend]

Public Member Functions

constexpr persp_euclid_plane (Point I_re, Point I_im, Line l_inf)
 Construct a new persp euclid plane object.
 
constexpr auto l_inf () const -> const Line &
 
constexpr auto perp (const Line &v) const -> Point
 Compute the pole of a line.
 
constexpr auto is_parallel (const Line &ln_l, const Line &ln_m) const -> bool
 Check if two lines are parallel.
 
constexpr auto midpoint (const Point &pt_a, const Point &pt_b) const -> Point
 Compute the midpoint of two points.
 
constexpr auto tri_midpoint (const Triple< Point > &triangle) const
 Compute the midpoints of all three sides of a triangle.
 
constexpr auto omega (const Point &x) const -> K
 Compute the omega value for a point.
 
constexpr auto omega (const Line &x) const -> K
 Compute the omega value for a line.
 
template<ProjectivePlane2 _Point>
constexpr auto measure (const _Point &a1, const _Point &a2) const
 Compute the cross-ratio measure between two elements.
 

Detailed Description

template<typename Point, typename Line = typename Point::Dual>
requires ProjectivePlanePrim<Point, Line>
class fun::persp_euclid_plane< Point, Line >

Perspective-Euclidean plane class.

A Cayley-Klein plane that combines projective geometry with Euclidean metrics.

Template Parameters
PointThe point type
LineThe line type (dual of point)

Constructor & Destructor Documentation

◆ persp_euclid_plane()

template<typename Point , typename Line = typename Point::Dual>
constexpr fun::persp_euclid_plane< Point, Line >::persp_euclid_plane ( Point  I_re,
Point  I_im,
Line  l_inf 
)
inlineconstexpr

Construct a new persp euclid plane object.

Member Function Documentation

◆ is_parallel()

template<typename Point , typename Line = typename Point::Dual>
constexpr auto fun::persp_euclid_plane< Point, Line >::is_parallel ( const Line &  ln_l,
const Line &  ln_m 
) const -> bool
inlineconstexpr

Check if two lines are parallel.

Parameters
[in]ln_lFirst line
[in]ln_mSecond line
Returns
true if lines are parallel, false otherwise

◆ l_inf()

template<typename Point , typename Line = typename Point::Dual>
constexpr auto fun::persp_euclid_plane< Point, Line >::l_inf ( ) const -> const Line&
inlineconstexpr

◆ measure()

template<typename Point , typename Line = typename Point::Dual>
template<ProjectivePlane2 _Point>
constexpr auto fun::persp_euclid_plane< Point, Line >::measure ( const _Point &  a1,
const _Point &  a2 
) const
inlineconstexpr

Compute the cross-ratio measure between two elements.

Returns the ratio of omega values for measuring projective relationships.

\[ \mu(a_1, a_2) = \frac{\omega(a_1 \times a_2)}{\omega(a_1)\omega(a_2)} \]

Parameters
[in]a1First point or line
[in]a2Second point or line
Returns
auto The measure value

◆ midpoint()

template<typename Point , typename Line = typename Point::Dual>
constexpr auto fun::persp_euclid_plane< Point, Line >::midpoint ( const Point &  pt_a,
const Point &  pt_b 
) const -> Point
inlineconstexpr

Compute the midpoint of two points.

\[ M = \operatorname{parametrize}(\alpha,\; a,\; \beta,\; b) \]

where \(\alpha = a \cdot l_\infty\), \(\beta = b \cdot l_\infty\).

Parameters
[in]pt_aFirst point
[in]pt_bSecond point
Returns
Point The midpoint

◆ omega() [1/2]

template<typename Point , typename Line = typename Point::Dual>
constexpr auto fun::persp_euclid_plane< Point, Line >::omega ( const Line &  x) const -> K
inlineconstexpr

Compute the omega value for a line.

The omega function measures how far a line is from the ideal points.

\[ \omega(l) = (l \cdot I_{\mathrm{re}})^2 + (l \cdot I_{\mathrm{im}})^2 \]

Parameters
[in]xA line
Returns
K The omega value

◆ omega() [2/2]

template<typename Point , typename Line = typename Point::Dual>
constexpr auto fun::persp_euclid_plane< Point, Line >::omega ( const Point &  x) const -> K
inlineconstexpr

Compute the omega value for a point.

The omega function measures how far a point is from the line at infinity.

\[ \omega(p) = (p \cdot l_\infty)^2 \]

Parameters
[in]xA point
Returns
K The omega value

◆ perp()

template<typename Point , typename Line = typename Point::Dual>
constexpr auto fun::persp_euclid_plane< Point, Line >::perp ( const Line &  v) const -> Point
inlineconstexpr

Compute the pole of a line.

\[ v^\perp = \alpha I_{\mathrm{re}} + \beta I_{\mathrm{im}} \]

where \(\alpha = v \cdot I_{\mathrm{re}}\) and \(\beta = v \cdot I_{\mathrm{im}}\).

Parameters
[in]vA line
Returns
Point The pole (polar) of the line

◆ tri_midpoint()

template<typename Point , typename Line = typename Point::Dual>
constexpr auto fun::persp_euclid_plane< Point, Line >::tri_midpoint ( const Triple< Point > &  triangle) const
inlineconstexpr

Compute the midpoints of all three sides of a triangle.

Parameters
[in]triangleArray of three points
Returns
Triple<Point> Array of three midpoints

The documentation for this class was generated from the following file: