template<class T>
Rodin::Geometry::Euclidean::Circle class

\[ (x - a)^2 + (y - b)^2 = r^2 \]

Public functions

auto operator()(const Point2D<T>& p) const -> T constexpr
auto operator()(const Math::Rad& angle) const -> Point2D<T> constexpr
auto radius() const -> T constexpr
auto center() const -> Point2D<T> constexpr
auto setCenter(const Point2D<T>& center) -> Circle& constexpr
auto setRadius(T radius) -> Circle& constexpr

Function documentation

template<class T>
T Rodin::Geometry::Euclidean::Circle<T>::operator()(const Point2D<T>& p) const constexpr

This function evaluates the point $(x, y) $

\[ f(x, y) = (x - a)^2 + (y - b)^2 - r^2 \]

template<class T>
Point2D<T> Rodin::Geometry::Euclidean::Circle<T>::operator()(const Math::Rad& angle) const constexpr

Parameters
angle in Angle in the range $[0, 2\pi]$ , which the ray from $(a, b)$ to $(x, y)$ makes with the positive x-axis.
Returns The point $ (x, y) $ on the circle.

This function evaluates the angle $\theta \in [0, 2\pi]$ using the parametric form of the circle:

\begin{eqnarray*} x &= a + r \cos{\theta}\\ y &= b + r \sin{\theta} \end{eqnarray*}

template<class T>
T Rodin::Geometry::Euclidean::Circle<T>::radius() const constexpr

Returns The radius of the circle.

template<class T>
Point2D<T> Rodin::Geometry::Euclidean::Circle<T>::center() const constexpr

Returns The center of the circle.

template<class T>
Circle& Rodin::Geometry::Euclidean::Circle<T>::setCenter(const Point2D<T>& center) constexpr

Parameters
center in New center of the circle.
Returns Reference to self (for method chaining).

Sets the center of the circle.

template<class T>
Circle& Rodin::Geometry::Euclidean::Circle<T>::setRadius(T radius) constexpr

Parameters
radius in New radius of the circle.
Returns Reference to self (for method chaining).

Sets the radius of the circle.