pub struct Arc3<T: Number> {
pub s: Vector3<T>,
pub m: Vector3<T>,
pub e: Vector3<T>,
}Expand description
The circular arc from s through m to e.
Fields§
§s: Vector3<T>§m: Vector3<T>§e: Vector3<T>Implementations§
Source§impl<T: Number> Arc3<T>
impl<T: Number> Arc3<T>
Sourcepub fn normal(&self) -> GeopResult<Vector3<T>>
pub fn normal(&self) -> GeopResult<Vector3<T>>
The unit normal of its plane, the way it turns: from s to e it
runs counter-clockwise about it.
Sourcepub fn half_sweep(&self) -> GeopResult<(T, T)>
pub fn half_sweep(&self) -> GeopResult<(T, T)>
cos and sin of half its sweep.
Sourcepub fn radius(&self) -> GeopResult<T>
pub fn radius(&self) -> GeopResult<T>
Its radius: |a| |b| |e - s| / (2 |a x b|).
Sourcepub fn center(&self) -> GeopResult<Vector3<T>>
pub fn center(&self) -> GeopResult<Vector3<T>>
Its center: m + (|a|^2 b - |b|^2 a) x (a x b) / (2 |a x b|^2).
Sourcepub fn half_sweep_between(
&self,
p: &Vector3<T>,
q: &Vector3<T>,
) -> GeopResult<(T, T)>
pub fn half_sweep_between( &self, p: &Vector3<T>, q: &Vector3<T>, ) -> GeopResult<(T, T)>
cos and sin of half the sweep from p to q along its circle,
the way it turns — two points of the arc, q after p: the part of
the arc between two of its points. The sine is the chord over the
diameter, |q - p| / (2 r); the cosine is the sine of the whole
sweep over twice the sine of half of it,
n . ((p - c) x (q - c)) / (r |q - p|), which carries the sign of a
sweep past a half turn without a case.
Sourcepub fn tangent(&self, at_end: bool) -> GeopResult<Vector3<T>>
pub fn tangent(&self, at_end: bool) -> GeopResult<Vector3<T>>
Its unit tangent at end, in its own direction — from s to e:
the chord’s direction turned back (at the start) or on (at the end)
by half the sweep, in the arc’s plane.