Skip to main content

OrigamiAnalysis

Struct OrigamiAnalysis 

Source
pub struct OrigamiAnalysis;
Expand description

Analysis tools for folded origami surfaces.

Computes geometric properties such as Gaussian curvature (angle deficit at vertices) and the effective Poisson’s ratio of the tessellation.

Implementations§

Source§

impl OrigamiAnalysis

Source

pub fn angle_deficit(sector_angles: &[f64]) -> f64

Compute the angle deficit (discrete Gaussian curvature) at a vertex, given the sector angles (in radians) of the faces meeting at that vertex.

For a flat sheet the deficit is 0; a cone tip has a positive deficit.

Source

pub fn kawasaki_residual(sector_angles: &[f64]) -> f64

Check Kawasaki’s theorem for a crease pattern at an interior vertex.

For flat-foldability the alternating sum of sector angles must equal π. Returns the residual (should be ≈ 0 for a flat-foldable vertex).

Source

pub fn maekawa_valid(mountain_count: usize, valley_count: usize) -> bool

Check Maekawa’s theorem: at an interior vertex the number of mountain folds and valley folds must differ by exactly 2.

Source

pub fn miura_poisson_ratio(alpha: f64, theta: f64) -> f64

Compute the effective in-plane Poisson’s ratio of a Miura-ori sheet.

Uses the analytical closed form for the Miura-ori.

Source

pub fn fold_bending_energy(k: f64, length: f64, theta: f64) -> f64

Estimate the bending energy of a fold line given fold angle and panel stiffness.

k is the rotational stiffness per unit length (N·m/m), length is the crease length (m), theta is the fold angle (radians).

Source

pub fn panel_gaussian_curvature( v0: &Vec3, v1: &Vec3, v2: &Vec3, v3: &Vec3, ) -> f64

Compute the Gaussian curvature of a parallelogram panel given its vertex positions.

For a flat (non-curved) panel, returns 0.

Source

pub fn fold_angle_from_normals(n1: &Vec3, n2: &Vec3, crease_dir: &Vec3) -> f64

Compute the fold angle between two planar facets given their unit normals and the shared crease direction.

Trait Implementations§

Source§

impl Clone for OrigamiAnalysis

Source§

fn clone(&self) -> OrigamiAnalysis

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for OrigamiAnalysis

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.