22 releases (6 major breaking)
6.1.0 | Nov 29, 2023 |
---|---|
5.1.0 | Sep 20, 2023 |
5.0.0 | Jul 28, 2023 |
4.0.0 | Apr 13, 2023 |
0.1.0 | Oct 28, 2021 |
#500 in Algorithms
149 downloads per month
Used in four-bar-ui
110KB
2.5K
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