GithubHelp home page GithubHelp logo

kurbo.rlib's Introduction

kurbo, a Rust 2D curves library

Build Status Docs Crates.io

The kurbo library contains data structures and algorithms for curves and vector paths. It is probably most appropriate for creative tools, but is general enough it might be useful for other applications.

The name "kurbo" is Esperanto for "curve".

There is a focus on accuracy and good performance in high-accuracy conditions. Thus, the library might be useful in engineering and science contexts as well, as opposed to visual arts where rough approximations are often sufficient. Many approximate functions come with an accuracy parameter, and analytical solutions are used where they are practical. An example is area calculation, which is done using Green's theorem.

The library is still in fairly early development stages. There are traits intended to be useful for general curves (not just Béziers), but these will probably be reorganized.

Minimum supported Rust version

Since version 0.9, kurbo makes use of generic associated types and thus requires rustc version 1.65 or greater.

Similar crates

Here we mention a few other curves libraries and touch on some of the decisions made differently here.

  • lyon_geom has a lot of very good vector algorithms. It's most focused on rendering.

  • flo_curves has good Bézier primitives, and seems tuned for animation. It's generic on the coordinate type, while we use f64 for everything.

  • vek has both 2D and 3D Béziers among other things, and is tuned for game engines.

Some code has been copied from lyon_geom with adaptation, thus the author of lyon_geom, Nicolas Silva, is credited in the AUTHORS file.

More info

To learn more about Bézier curves, A Primer on Bézier Curves by Pomax is indispensable.

Contributing

Contributions are welcome. The Rust Code of Conduct applies. Please feel free to add your name to the AUTHORS file in any substantive pull request.

kurbo.rlib's People

Contributors

0hypercube avatar chubei-oppen avatar cmyr avatar derekdreery avatar derlando avatar dfrg avatar halfvoxel avatar jaicewizard avatar jatentaki avatar jneem avatar jocelyn-stericker avatar laurmaedje avatar matthiasbeyer avatar michael-f-bryan avatar mlwilkerson avatar msiglreith avatar mwcampbell avatar profaurore avatar rahix avatar raphlinus avatar razrfalcon avatar secondflight avatar sh4rk avatar simoncozens avatar vanshoe avatar xstrom avatar yrns avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.