Readit News logoReadit News
ttd commented on Bezier-rs – algorithms for Bézier segments and shapes   graphite.rs/libraries/bez... · Posted by u/jarek-foksa
ttoinou · 14 days ago
Instead of using closed form, they can easily computed with the approximation of the curve with segments, and you place the points where there is most curvature or where the 1st derivative isn't close to zero
ttd · 13 days ago
Yes - but there are other curve classes (like P-H) that have an exact solution and don't need approximation. Bezier curves have tons of nice properties but also a lot of shortcomings, for example not being able represent conic sections like circles and ellipses without introducing weighting (rationals), which complicate computations even further. So, depending on what you're doing with them, it's worth exploring other curve types IMO.
ttd commented on Bezier-rs – algorithms for Bézier segments and shapes   graphite.rs/libraries/bez... · Posted by u/jarek-foksa
Syzygies · 14 days ago
I'm hoping to code Bezier animation in OCaml/F# in four dimensional space time, with a moving vantage point. Offload rendering each time slice frame to worker threads.

I'm surprised Bezier-rs is all about curves. Sure, fonts, but I can't be alone here in seeing curves as a special case.

It's easy as a pure mathematician to write off Bezier theory as "specialized" but it's simply the right way to work with polynomials on a simplex.

ttd · 14 days ago
If you're not restricted to Bezier for graphics (it's a very common choice as the path primitive for vector graphics), there are other classes of curves that you may find are a better fit. In particular, I think animations typically feel better if they move at constant speed - which is nontrivial with Bezier curves because they do not have an exact closed-form arc length parameterization. Something like pythagorean hodographs could be a better fit for your application.

I am not a mathematician though, so if you have other insight I'd be glad to hear it.

ttd commented on     · Posted by u/ttd
ttd · a month ago
Preview of an upcoming feature - adding interactivity to your diagrams. This may be of interest to those who do a lot of architecture-level design and presentation, since many times you'll want something high-level with details hidden unless they're relevant for the audience or discussion.
ttd commented on Ask HN: What Are You Working On? (June 2025)    · Posted by u/david927
ygreif · a month ago
Looks neat. I'm a LucidChart user. One thing I'd like to see is the text going inside the shapes more automagically
ttd · a month ago
Thank you for checking it out! What sort of text auto-magic are you looking for?
ttd commented on Ask HN: What Are You Working On? (June 2025)    · Posted by u/david927
phkahler · 2 months ago
Years ago I was making a diagram editor with the intent of doing code generation from diagrams (like simulink, not stateflow). I started with splines for the connections and decided straight lines and junctions would be better for complex diagrams. I realized that a better way to internally define the connecting wires is via a set of lines and their connectivity (vs their endpoint coordinates). Imagine each line segment is defined by a direction (vertical or horizontal) and a position (perpendicular distance from the origin) Like ax+by=d where a and b are either 0 or 1. You also need to define which other lines it connects to. Given the list of connections you can then calculate the intersections at rendering time. By sorting the list of connections you can render the line without features at the start and end, and then draw junctions for any intermediate connections. The beauty of this would be to allow dragging blocks around and having the lines follow with the junctions passing through each other as needed. There is some housekeeping with this data structure (merging colinear segments that connect, breaking segments when needed) but the UI for dragging should be much better than anything out there.
ttd · 2 months ago
Interesting - do you have a writeup or a demo available somewhere? What types of junctions were you envisioning?
ttd commented on Ask HN: What Are You Working On? (June 2025)    · Posted by u/david927
boxcarr · 2 months ago
Looks pretty great! The free tier also looks reasonable. The pricing on the other tiers isn't outrageous either if you use it consistently. Unfortunately, I likely find myself in the big gap between the free tier and the Basic plan. I can't justify yet another subscription that I use only a couple of times a year. That said, I would happily pay the $6 on the months that I use the service. Given the churn issues, I'm surprised more SaaS offerings don't work that way.
ttd · 2 months ago
Thank you for sharing this perspective! Your proposal is potentially a good middle ground, and I will certainly give this some thought.

u/ttd

KarmaCake day401February 20, 2017
About
Creator of Vexlio, diagramming software with automatic snapping, LaTeX equation editor, and more. Landing page is https://vexlio.com/.

Get in touch at: tyler at vexlio dot com

Check out the app, no sign-in required: https://app.vexlio.com/

View Original