20 releases (10 stable)
new 5.1.0 | Sep 20, 2023 |
---|---|
5.0.0 | Jul 28, 2023 |
4.0.0 | Apr 13, 2023 |
3.1.0 | Nov 18, 2022 |
0.1.0 | Oct 28, 2021 |
#794 in Algorithms
96 downloads per month
Used in four-bar-ui
90KB
2K
SLoC
Four🍀bar
Four-bar is a simulator and a synthesizing tool for four-bar linkage mechanism.
use four_bar::FourBar;
// Get the trajectory of the coupler point
let path = FourBar::example().curve(360);
The synthesis function let you synthesize a four-bar mechanism by fitting target curve.
use four_bar::{mh, syn};
let func = syn::FbSyn::from_curve(curve, syn::Mode::Closed).res(res);
let s = mh::Solver::build(mh::Rga::default(), func)
.task(|ctx| ctx.gen == gen)
.pop_num(pop)
.solve()
.unwrap();
lib.rs
:
Four🍀bar is a simulator, a synthesizing tool for four-bar linkage mechanism.
https://en.wikipedia.org/wiki/Four-bar_linkage
use four_bar::FourBar;
// Get the trajectory of the coupler point
let path = FourBar::example().curve(360);
Dependencies
~6–9MB
~180K SLoC