pub type Figure<'a, 'b> = FigureBase<'a, 'b, SFourBar, [f64; 3]>;Available on crate feature
plot only.Expand description
Drawing option of spherical four-bar linkage and its input angle.
Please see Figure::plot() for more information.
Aliased Type§
struct Figure<'a, 'b> {
pub fb: Option<Cow<'b, FourBarBase<UnNorm, SNormFourBar>>>,
pub angle: Option<f64>,
pub lines: Vec<Rc<RefCell<LineData<'a, [f64; 3]>>>>,
pub opt: Opt<'a>,
}Fields§
§fb: Option<Cow<'b, FourBarBase<UnNorm, SNormFourBar>>>Linkage
angle: Option<f64>Input angle
lines: Vec<Rc<RefCell<LineData<'a, [f64; 3]>>>>Line data
opt: Opt<'a>Drawing options
Implementations§
source§impl Figure<'_, '_>
impl Figure<'_, '_>
sourcepub fn plot<B, R>(
&self,
root: R
) -> Result<(), DrawingAreaErrorKind<<B as DrawingBackend>::ErrorType>>where
B: DrawingBackend,
DrawingArea<B, Shift>: From<R>,
pub fn plot<B, R>( &self, root: R ) -> Result<(), DrawingAreaErrorKind<<B as DrawingBackend>::ErrorType>>where B: DrawingBackend, DrawingArea<B, Shift>: From<R>,
Plot 3D spherical linkage.
Please see Opt for more options.
use four_bar::{plot3d::*, SFourBar};
let fb = SFourBar::example();
let mut buf = String::new();
Figure::from(&fb)
.axis(false)
.add_line("First Curve", fb.curve(180), Style::Line, BLACK)
.plot(SVGBackend::with_string(&mut buf, (1600, 1600)))
.unwrap();