#[non_exhaustive]pub enum SheetMethod {
Geodesic,
LeastDistortion {
resolution: f64,
},
AsRigidAsPossible {
resolution: f64,
stretch: f64,
},
}Expand description
How the flat sheet is carried away from its origin.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Geodesic
Geodesic polar coordinates: the sheet point at distance r and
angle t from the origin lands where the geodesic leaving the
origin at angle t from the sheet’s +x is after length r (the
exponential map). Lengths along lines through the origin are kept.
LeastDistortion
The conformal flattening of the geodesic disc the sheet covers that
stretches nothing along the disc’s rim, pinned at the origin with
its +x along the sheet’s, and scaled to keep the disc’s area as a
whole. On a sphere it is the stereographic projection from the
origin’s antipode.
It is conformal, not area-keeping: angles are kept, and lengths stretch alike in every direction at a point but by different amounts from point to point, so a region’s area on the surface is not its area on the sheet. On a sphere of radius 10 with reach 5 the stretch runs from 1.031 at the origin to 0.968 at the reach, and a 6 x 4 rectangle at the origin covers 25.07 rather than 24.
The flattening is computed on a mesh, and
SurfaceSheet::flattening_error is an estimate, not a bound, of
how far the laid map stands from the smooth one; see there for the
assumption it rests on. On a plane, a cylinder and a cone it is
their exact development, as Geodesic is.
Fields
AsRigidAsPossible
The as-rigid-as-possible flattening of the geodesic disc the sheet
covers: each triangle of a mesh of the disc as near a rotation of
itself on the surface as the whole allows, so lengths stretch as
little as they can in every direction at once, and areas with them.
Pinned at the origin with its +x along the sheet’s, and not
scaled.
The flattening is a minimum of a non-convex energy, settled from
the conformal flattening, and not unique: nothing is said of how
far it stands from any smooth map. The sheet is judged by what it
does. Its length ratio, against the surface’s own metric, is
measured at every vertex and triangle centroid of the flattened mesh
within the reach, and the sheet is refused where any falls outside
1 / (1 + stretch) to 1 + stretch, or where it folds over. These
are measurements at those points, not a bound between them.
SurfaceSheet::distortion starts from the range measured.
SurfaceSheet::flattening_error is the miss of the smooth map
carried, a polynomial, against the mesh’s own map, within half of
resolution at the same points. On a plane, a cylinder and a cone it
is their exact development.
Trait Implementations§
Source§impl Clone for SheetMethod
impl Clone for SheetMethod
impl Copy for SheetMethod
Source§impl Debug for SheetMethod
impl Debug for SheetMethod
Source§impl PartialEq for SheetMethod
impl PartialEq for SheetMethod
impl StructuralPartialEq for SheetMethod
Auto Trait Implementations§
impl Freeze for SheetMethod
impl RefUnwindSafe for SheetMethod
impl Send for SheetMethod
impl Sync for SheetMethod
impl Unpin for SheetMethod
impl UnsafeUnpin for SheetMethod
impl UnwindSafe for SheetMethod
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,
impl<T> Scalar for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.