pub struct OrientedHyperbolicPoint<const N: usize, R> {
pub position: Hyperbolic<N>,
pub orientation: R,
}Expand description
The position and orientation of an extended body in hyperbolic space.
Use OrientedHyperbolicPoint as a Body or
Site property type.
§Example
use hoomd_manifold::{Hyperbolic, Minkowski};
use hoomd_microstate::property::OrientedHyperbolicPoint;
use hoomd_vector::Angle;
let point = OrientedHyperbolicPoint {
position: Hyperbolic::from_minkowski_coordinates(Minkowski::from([
0.0, 0.0, 1.0,
])),
orientation: Angle::from(2.39),
};Fields§
§position: Hyperbolic<N>The location of the extended body in the system frame.
orientation: ROrientation of the body in the global frame.
Implementations§
Source§impl OrientedHyperbolicPoint<3, Angle>
impl OrientedHyperbolicPoint<3, Angle>
Sourcepub fn intersection_point(theta: f64, boost: f64) -> (f64, f64)
pub fn intersection_point(theta: f64, boost: f64) -> (f64, f64)
Compute the intersection of the geodesic arc passing through a point and the x axis, given the polar coordinates of the point. Returns a tuple containing the x coordinates of the intersection and the signed arc-angle of the path.
Sourcepub fn parallel_transport_angle(
start: &Hyperbolic<3>,
destination: &Hyperbolic<3>,
) -> f64
pub fn parallel_transport_angle( start: &Hyperbolic<3>, destination: &Hyperbolic<3>, ) -> f64
Compute the signed angle change when an oriented hyperbolic point is translated to another point.
Sourcepub fn deck_transform(
boost: f64,
rotation: f64,
position: &Hyperbolic<3>,
) -> f64
pub fn deck_transform( boost: f64, rotation: f64, position: &Hyperbolic<3>, ) -> f64
Compute the change in orientation associated with a transformation from a given
position. Isometries of hyperbolic space can be expressed as a boost conjugated
by a rotation, i.e., $R(\theta) T(\eta) R(-\theta)$. Such a transformation can
be expressed in the Poincaré disk representation as the Mobius transformation
g(z) = \begin{bmatrix} \cosh(\eta/2) & e^{i\theta} \sinh(\eta/2) \\ e^{-i\theta}\sinh(\eta/2) & \cosh(\eta/2) \end{bmatrix}This transformation induces a rotation of angle $\Delta\phi$ in the tangent
bundle, where
\Delta \phi = \operatorname{Arg} [g'(z)] = -2 \operatorname{Arg}[e^{-i\theta}\sinh(\eta/2)z + \cosh(\eta/2)]Sourcepub fn sample<R: Rng + ?Sized>(
disk: &HyperbolicDisk,
rng: &mut R,
) -> (Hyperbolic<3>, f64, f64)
pub fn sample<R: Rng + ?Sized>( disk: &HyperbolicDisk, rng: &mut R, ) -> (Hyperbolic<3>, f64, f64)
Generate a random HyperbolicDisk point with the corresponding boost rapidity
and rotation angle. Function returns a tuple with the random Hyperbolic<3>
point in the first entry, the associated rapidity and angle in the second and
third entries, respectively.
§Panics
Panics when maximum boost is a non-positive number.
Trait Implementations§
Source§impl<B, X, C> AppendMicrostate<B, OrientedHyperbolicPoint<3, Angle>, X, C> for HoomdGsdFile
impl<B, X, C> AppendMicrostate<B, OrientedHyperbolicPoint<3, Angle>, X, C> for HoomdGsdFile
Source§fn append_microstate(
&mut self,
microstate: &Microstate<B, OrientedHyperbolicPoint<3, Angle>, X, C>,
) -> Result<Frame<'_>, AppendError>
fn append_microstate( &mut self, microstate: &Microstate<B, OrientedHyperbolicPoint<3, Angle>, X, C>, ) -> Result<Frame<'_>, AppendError>
Source§impl<const N: usize, R: Clone> Clone for OrientedHyperbolicPoint<N, R>
impl<const N: usize, R: Clone> Clone for OrientedHyperbolicPoint<N, R>
Source§fn clone(&self) -> OrientedHyperbolicPoint<N, R>
fn clone(&self) -> OrientedHyperbolicPoint<N, R>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<const N: usize, R: Default> Default for OrientedHyperbolicPoint<N, R>
impl<const N: usize, R: Default> Default for OrientedHyperbolicPoint<N, R>
Source§fn default() -> OrientedHyperbolicPoint<N, R>
fn default() -> OrientedHyperbolicPoint<N, R>
Source§impl GenerateGhosts<OrientedHyperbolicPoint<3, Angle>> for Periodic<EightEight>
impl GenerateGhosts<OrientedHyperbolicPoint<3, Angle>> for Periodic<EightEight>
Source§fn generate_ghosts(
&self,
site_properties: &OrientedHyperbolicPoint<3, Angle>,
) -> ArrayVec<OrientedHyperbolicPoint<3, Angle>, MAX_GHOSTS>
fn generate_ghosts( &self, site_properties: &OrientedHyperbolicPoint<3, Angle>, ) -> ArrayVec<OrientedHyperbolicPoint<3, Angle>, MAX_GHOSTS>
Place periodic images of sites near the edge of the periodic boundary
Source§fn maximum_interaction_range(&self) -> f64
fn maximum_interaction_range(&self) -> f64
Source§impl GenerateGhosts<OrientedHyperbolicPoint<3, Angle>> for Periodic<TwelveTwelve>
impl GenerateGhosts<OrientedHyperbolicPoint<3, Angle>> for Periodic<TwelveTwelve>
Source§fn generate_ghosts(
&self,
site_properties: &OrientedHyperbolicPoint<3, Angle>,
) -> ArrayVec<OrientedHyperbolicPoint<3, Angle>, MAX_GHOSTS>
fn generate_ghosts( &self, site_properties: &OrientedHyperbolicPoint<3, Angle>, ) -> ArrayVec<OrientedHyperbolicPoint<3, Angle>, MAX_GHOSTS>
Place periodic images of sites near the edge of the periodic boundary.
Source§fn maximum_interaction_range(&self) -> f64
fn maximum_interaction_range(&self) -> f64
Source§impl<const N: usize, R> Orientation for OrientedHyperbolicPoint<N, R>
impl<const N: usize, R> Orientation for OrientedHyperbolicPoint<N, R>
Source§impl<const N: usize, R: PartialEq> PartialEq for OrientedHyperbolicPoint<N, R>
impl<const N: usize, R: PartialEq> PartialEq for OrientedHyperbolicPoint<N, R>
Source§fn eq(&self, other: &OrientedHyperbolicPoint<N, R>) -> bool
fn eq(&self, other: &OrientedHyperbolicPoint<N, R>) -> bool
self and other values to be equal, and is used by ==.Source§impl<const N: usize, R> Position for OrientedHyperbolicPoint<N, R>
impl<const N: usize, R> Position for OrientedHyperbolicPoint<N, R>
Source§type Position = Hyperbolic<N>
type Position = Hyperbolic<N>
Source§fn position(&self) -> &Hyperbolic<N>
fn position(&self) -> &Hyperbolic<N>
Source§fn position_mut(&mut self) -> &mut Hyperbolic<N>
fn position_mut(&mut self) -> &mut Hyperbolic<N>
Source§impl Transform<OrientedHyperbolicPoint<3, Angle>> for OrientedHyperbolicPoint<3, Angle>
impl Transform<OrientedHyperbolicPoint<3, Angle>> for OrientedHyperbolicPoint<3, Angle>
Source§fn transform(
&self,
site_properties: &OrientedHyperbolicPoint<3, Angle>,
) -> OrientedHyperbolicPoint<3, Angle>
fn transform( &self, site_properties: &OrientedHyperbolicPoint<3, Angle>, ) -> OrientedHyperbolicPoint<3, Angle>
Source§impl Transform<Point<Hyperbolic<3>>> for OrientedHyperbolicPoint<3, Angle>
Treat Point<Hyperbolic<3>> sites as constituents of oriented rigid bodies.
impl Transform<Point<Hyperbolic<3>>> for OrientedHyperbolicPoint<3, Angle>
Treat Point<Hyperbolic<3>> sites as constituents of oriented rigid bodies.
Source§fn transform(
&self,
site_properties: &Point<Hyperbolic<3>>,
) -> Point<Hyperbolic<3>>
fn transform( &self, site_properties: &Point<Hyperbolic<3>>, ) -> Point<Hyperbolic<3>>
Move Point<Hyperbolic<3>> properties from the local body frame to the system frame.
use approxim::assert_relative_eq;
use hoomd_manifold::Hyperbolic;
use hoomd_microstate::{
Transform,
property::{OrientedHyperbolicPoint, Point},
};
use hoomd_vector::Angle;
use std::f64::consts::PI;
let body_boost = 1.1;
let body_orientation = PI / 2.0;
let site_boost = 0.1;
let body = OrientedHyperbolicPoint {
position: Hyperbolic::<3>::from_polar_coordinates(body_boost, 0.0),
orientation: Angle::from(body_orientation),
};
let site = Point::new(Hyperbolic::<3>::from_polar_coordinates(
site_boost,
-PI / 4.0,
));
let transformed_site = body.transform(&site);
assert_relative_eq!(
*transformed_site.position.point(),
[
(body_boost.sinh()) * (site_boost.cosh())
+ ((PI / 4.0).cos())
* (body_boost.cosh())
* (site_boost.sinh()),
((PI / 4.0).sin()) * site_boost.sinh(),
(body_boost.cosh()) * (site_boost.cosh())
+ ((PI / 4.0).cos())
* (body_boost.sinh())
* (site_boost.sinh()),
]
.into(),
epsilon = 1e-12
);Source§impl Wrap<OrientedHyperbolicPoint<3, Angle>> for Periodic<EightEight>
impl Wrap<OrientedHyperbolicPoint<3, Angle>> for Periodic<EightEight>
Source§fn wrap(
&self,
properties: OrientedHyperbolicPoint<3, Angle>,
) -> Result<OrientedHyperbolicPoint<3, Angle>, Error>
fn wrap( &self, properties: OrientedHyperbolicPoint<3, Angle>, ) -> Result<OrientedHyperbolicPoint<3, Angle>, Error>
Wrap the positions and orientations of oriented bodies in two-dimensional hyperbolic space under the {8,8} tiling.
Source§impl Wrap<OrientedHyperbolicPoint<3, Angle>> for Periodic<TwelveTwelve>
impl Wrap<OrientedHyperbolicPoint<3, Angle>> for Periodic<TwelveTwelve>
Source§fn wrap(
&self,
properties: OrientedHyperbolicPoint<3, Angle>,
) -> Result<OrientedHyperbolicPoint<3, Angle>, Error>
fn wrap( &self, properties: OrientedHyperbolicPoint<3, Angle>, ) -> Result<OrientedHyperbolicPoint<3, Angle>, Error>
Wrap the positions and orientations of oriented bodies in hyperbolic space under the {12,12} tiling.
impl<const N: usize, R: Copy> Copy for OrientedHyperbolicPoint<N, R>
impl<const N: usize, R> StructuralPartialEq for OrientedHyperbolicPoint<N, R>
Auto Trait Implementations§
impl<const N: usize, R> Freeze for OrientedHyperbolicPoint<N, R>where
R: Freeze,
impl<const N: usize, R> RefUnwindSafe for OrientedHyperbolicPoint<N, R>where
R: RefUnwindSafe,
impl<const N: usize, R> Send for OrientedHyperbolicPoint<N, R>where
R: Send,
impl<const N: usize, R> Sync for OrientedHyperbolicPoint<N, R>where
R: Sync,
impl<const N: usize, R> Unpin for OrientedHyperbolicPoint<N, R>where
R: Unpin,
impl<const N: usize, R> UnwindSafe for OrientedHyperbolicPoint<N, R>where
R: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more