New Béziers from Math

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • bezierjs

    A nodejs and client-side library for (cubic) Bezier curve work

  • bezier

    Bezier is a single header only C++ library for Bezier curve calculations and manipulations.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • mach

    zig game engine & graphics toolkit

  • Cool to see others working on this problem. I hope more people do.

    Funnily I've seen a lot of programmers and math folks who express how truly, genuinely beautiful Beziers and the math behind them are. But I've never met an artist or graphic designer who didn't express some deep frustration at Bezier controls and how hard they are to work with.

    There are even games[0] which make a mockery out of how hard Bezier controls are to use, where the game is purely using the controls.

    Controls are just one side of the problem, in my view; the other side is that cubics are terrible for GPUs, they don't understand them - and I believe many of the best 2D graphics libraries today are not even fully GPU accelerated, e.g. Skia. There are folks working on compute shader-based approaches, where we try to shoe-horn this CPU-focused algorithm into GPUs and pray - but it still isn't really suitable.

    The controls suck for artists, and the math sucks for GPUs. This is only true of cubics, if you restrict yourself to quadratics (although that brings other challenges), both the control issue goes away (you can just click+drag the curve!) and the performance issue goes away (quadratics are triangles, GPUs love them)

    That's the summary of the talk[1] I gave at SYCL'22. In that talk, I didn't have time to present the downsides of quadratics (which are real) - so if you watch it please keep that in mind - but my overall point I think is a solid one: the controls suck, and GPUs can't handle them.

    The only reason we stick with cubics in its current form is because of SVG, compatibility with existing tooling, etc. But isn't it crazy? We have new bitmap image formats all the time, and so few vector graphics formats.

    In Mach engine[2] we're continuing to explore this space, end-to-end, from author tooling -> format -> rendering. I'm not claiming we have a perfect solution, we don't, but we're at least thinking about this problem. Kudos to the authors of this article for thinking about this space as well.

    [0] https://bezier.method.ac/

    [1] https://www.youtube.com/watch?v=QTybQ-5MlrE

    [2] https://machengine.org

  • local-curves

    Discontinued a not very serious implementation, and also not maintained

  • The source code is visible with Ctrl+U, I didn't minimize anything. The g9 use is pretty neat. It definitely deserves the shout-out I gave it.

    I just now uploaded a worse C++ desktop version with saving and loading: https://github.com/ad8e/local-curves This desktop version is 5 years old. I think the web version is better. This github repo is only interesting if you want to copy code from it; it's not practical as a drawing tool.

  • Geom_2D

    2D geometry classes and methods

  • And here's the code for that

    https://github.com/johnalexandergreene/Geom_2D/blob/master/C...

    There's a version of that for open curves too, elsewhere in that package .

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts