All Projects → Logicalshift → flo_curves

Logicalshift / flo_curves

Licence: Apache-2.0 License
Bezier curve library for Rust

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to flo curves

BezierPathClosestPoint
Finding the closest point on UIBezierPath
Stars: ✭ 43 (-10.42%)
Mutual labels:  bezier-curves, bezier-path
Bezier.py
➰ Create Bezier curves in Python [Mirror]
Stars: ✭ 22 (-54.17%)
Mutual labels:  bezier-curves
cloud gen
Procedural Generation of Clouds with Vector Graphics
Stars: ✭ 46 (-4.17%)
Mutual labels:  bezier-curves
shapekeyimport
Blender add-on to import shapekeys
Stars: ✭ 31 (-35.42%)
Mutual labels:  bezier-curves
BezierCurtainEffect
贝塞尔曲线窗帘效果BezierCurtainEffect,BezierCurtainView,CurtainEffect,CurtainView
Stars: ✭ 45 (-6.25%)
Mutual labels:  bezier-path
Pathslider
Numerical slider that follows a Bezier path
Stars: ✭ 15 (-68.75%)
Mutual labels:  bezier-path
CurveFitting
〰️ Curve fitting based on Schneider's algorithm. Written using C++11 and OpenSceneGraph (visualization)
Stars: ✭ 75 (+56.25%)
Mutual labels:  bezier-curves
BezierCanvas
Adobe Illustrator's pen tool style bezier editor on Unity.
Stars: ✭ 126 (+162.5%)
Mutual labels:  bezier-curves
curve cad
Blender Addon: Bezier Curve CAD Tools for CNC Milling & Laser Cutting
Stars: ✭ 107 (+122.92%)
Mutual labels:  bezier-curves
BezierCurves2D
An implementation of 2D Bezier Curves in C++ using OpenGL, gl3w, glfw3 and imgui.
Stars: ✭ 41 (-14.58%)
Mutual labels:  bezier-curves
PersonDemo
🔥 一些个人学习中备份的技术方案
Stars: ✭ 16 (-66.67%)
Mutual labels:  bezier-curves
IVBezierPathRenderer
Alternative Path Renderer for Apple MapKit to render path with bezier curve
Stars: ✭ 31 (-35.42%)
Mutual labels:  bezier-curves
bezmouse
Simulate human mouse movements with xdotool
Stars: ✭ 110 (+129.17%)
Mutual labels:  bezier-curves
bezier-editor
A tool base on HTML5 canvas to create bezier curve like photoshop and then it can be exported as JavaScript code to create an animation path for an HTML element.
Stars: ✭ 21 (-56.25%)
Mutual labels:  bezier-curves
SwiftUI-bez
Utilities for working with bezier curves in SwiftUI
Stars: ✭ 80 (+66.67%)
Mutual labels:  bezier-curves
phaser3-plugin-pathbuilder
Draw and edit Lines, Bezier Curves, Splines at runtime, explore your scene and export your paths to Phaser
Stars: ✭ 67 (+39.58%)
Mutual labels:  bezier-curves
Bezierinfo 2
The development repo for the Primer on Bézier curves, https://pomax.github.io/bezierinfo
Stars: ✭ 1,843 (+3739.58%)
Mutual labels:  bezier-curves
React Designer
It's not art
Stars: ✭ 1,762 (+3570.83%)
Mutual labels:  bezier-curves
flo_curves = "0.6"

flo_curves

flo_curves is a library of routines for inspecting and manipulating curves, with a focus on cubic Bézier curves. In this library, you'll find routines for computing points on curves, performing collision detection between curves and lines or other curves, all the way up to routines for combining paths made up of multiple curves.

Anyone doing any work with Bézier curves will likely find something in this library that is of use, but its range of functions makes it particularly useful for collision detection or performing path arithmetic.

A set of curve and coordinate types are provided by the library, as well as a set of traits that can be implemented on any types with suitable properties. Implementing these traits makes it possible to add the extra features of this library to any existing code that has its own way of representing coordinates, curves or paths.

flo_curves was built as a support library for flowbetween, an animation tool I'm working on.

Examples

Creating a curve:

use flo_curves::*;
use flo_curves::bezier;

let curve = bezier::Curve::from_points(Coord2(1.0, 2.0), (Coord2(2.0, 0.0), Coord2(3.0, 5.0)), Coord2(4.0, 2.0));

Finding a point on a curve:

use flo_curves::bezier;

let pos = curve.point_at_pos(0.5);

Intersections:

use flo_curves::bezier;

for (t1, t2) in bezier::curve_intersects_curve_clip(curve1, curve2) {
    let pos = curve1.point_at_pos(t1);
    println!("Intersection, curve1 t: {}, curve2 t: {}, position: {}, {}", t1, t2, pos.x(), pos.y());
}

Creating a path:

use flo_curves::bezier;
use flo_curves::bezier::path::*;

let rectangle1 = BezierPathBuilder::<SimpleBezierPath>::start(Coord2(1.0, 1.0))
    .line_to(Coord2(5.0, 1.0))
    .line_to(Coord2(5.0, 5.0))
    .line_to(Coord2(1.0, 5.0))
    .line_to(Coord2(1.0, 1.0))
    .build();

Path arithmetic:

use flo_curves::bezier::path::*;

let rectangle_with_hole = path_sub::<_,_, SimpleBezierPath>(&vec![rectangle], &vec![circle])

flo_curves logo

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].