I made a spline guide

it's not complete by any means, I just wanted to have a guide for the splines I've implemented in my spline tool c:

there *is* a C2 interpolating spline I've yet to implement - the cubic natural spline, but as a tradeoff in that one you lose local control, so it's a lil wonky

@acegikmo Hi Freya, I just followed you as your posts make my brain hurt. well done. You may enjoy this i found it to be amazing.

https://rumble.com/v2o2oe5-synthwave-radio-beats-to-chillgame-to.html

Synthwave Radio 🌌 - beats to chill/game to

Rumble.com
@acegikmo Would i as your spline-tool-user have to go through this chart to decide which type to use?
@tjheuvel if you want! I'll make a prettier guide once the actual plugin is done :)
@acegikmo I have been trying to see if C2 interpolating splines may be possible by using nonuniform B-splines. It is very much possible to create it, but if I also want to be able to interactively move the interpolated points, that becomes an issue.
@acegikmo A splide, if you will.
@acegikmo
_Love_ the final red box. I switched to GlaDOS voice in my head immediately ❤️
@acegikmo Thank you, this will help me, with my splines

@acegikmo

I think my spline is aching. What happened to the nice, simple cubic splines that I normally use?

#splines #toomuchinput

@acegikmo May I have a constant velocity spline please
@sol_hsa all my splines support arc-length parameterization! if you're looking for that
@acegikmo
If I can ask for anything(tm), a catmull-rom style spline with constant velocity would be great for any number of lotus/out run style games.
@acegikmo
I remember trying to fake this by estimating segment lengths and then moving control points around until segments were approximately the same length, but that quickly blew up on my face..

@sol_hsa yeah, that's what arc length parameterization is :)

it's a supported feature on all my splines (though it does require some extra memory and computation)

@acegikmo
What if I want to exactly represent circular curves? 😉

@Aradayn currently not supported! I need to figure out a good way to set up that kind of spline, bc there's not really any good ones out there as far as I know

Biarcs are weird and I don't know when you'd need them. NURBS are way too complicated to make circular arcs with, and rounded polylines struggle with helix stuff in 3D

@acegikmo
Yeah, that's a drawback for sure... I'm using NURBS for my spline editor/renderer, because true circles were very important to me.

Currently, I'm just allowing pre-created circles, but I'm planning to add the ability to "circularize" a segment of a curve as a higher-level editing feature.

But your stuff is way more impressive than my amateurish efforts! Thanks for sharing.

@Aradayn yeah, makes sense. I think I've just found that, true circles are rarely actually needed in game dev, people just really like them conceptually, even though they're actually kinda clunky and often discontinuous lol

@acegikmo @Aradayn Euler spirals solve this problem nicely and behave quite intuitively (better than bezier and definitely better than biarc).

@raph has written a book on interpolating splines which covers this question in great detail (and includes an MIT-licensed implementation). It's available at https://levien.com/phd/phd.html

Raph Levien’s thesis

@gtsteel @acegikmo @raph
Wow, thanks! Euler spirals seem to be, at least from the construction, manipulation, and feature standpoints, very close to the ideal I was imagining when I first got started on the project that inspired this question.

I don't know that I want to abandon all the NURBS work I've done so far. This is quite a quandary... I'm about to start on advanced manipulation techniques. It might or might not be better to explore these: the potential difficulty seems about the same.

@acegikmo where does reticulated fit in?
@groxx reticulation is just to arrange so that's your job once you've figured out which one to use
@acegikmo @groxx Also when booting Sim City or Sim Copter.
@acegikmo or just use rational beziers ^^
@acegikmo thanks I hate it and im not sure why
@acegikmo I need to paste this inside my old college numerical analysis textbook.
@acegikmo That's awesome, thanks for sharing!
@acegikmo feature request: for v2 can all the lines between the boxes be constructed with the type of splines being referenced
@acegikmo Thanks, but I'm stuck in the bottom left corner 😢
@acegikmo a perfect balance of cursed, useful, and relatable.
@acegikmo how is this guide the way that I am learning that "bézier curve" and "b-spline" are not synonymous
@acegikmo @awwbees two separate things, yes. Although to cause extra confusion: a B-spline without interior knots is a Bézier curve (so *some* B-splines are Bézier curves, but not all)
@acegikmo C2 and passing through: Natural cubic spline. https://en.wikipedia.org/wiki/Spline_(mathematics)#Examples
Spline (mathematics) - Wikipedia

@acegikmo That is a standard thing, you have to solve a (tridiagonal, so easy mode) linear system to get the coeffs, and you get to pick the points they pass through and the boundary conditions but have absolutely no control over the shape in the middle of it; C2 + interpolating takes care of all the degrees of freedom in the interior of the curve
@rygorous yep! It's on my todo list

@acegikmo More generally, if you want higher levels of continuity and/or more control over things like derivatives, you can always do that by using a higher degree, it just gets unwieldy.

Finally B-splines are just a basis (that happens to be numerically very well-behaved), you can write any spline of a given degree in B-spline form and this is often a good idea if you need to do numerical work on it

@acegikmo So many things to reticulate
@acegikmo HOW AM I SUPPOSED TO RETICULATE THAT???
@acegikmo Where's the reticulated option?
@acegikmo i didn't even know there are so many types of splines. Thanks for showing me
@acegikmo Splines originally used as guides, now a guide to using splines. The circle is complete.
@acegikmo how to reticulate tho
@acegikmo oh no @oppen the superellipse is calling again
@acegikmo this digraph could have been a switch statement 💕
@acegikmo I've so many questions 😶
@acegikmo If you want G2, passing through all the points, and able to reperesent circular arcs exactly, you probably want an Euler spiral spline. These have a long history of use in engineering (especially in railorad construction and shipbuilding) but aren't that well known in graphic design (which makes them the killer feature of inkscape).
@acegikmo Came here for something about “reticulation.” Was disappointed.
@acegikmo This flow chart explains why #flightgear airport surface fitting is weird, but probably could be revisited some day.
@acegikmo "Summarize four years of pointless, repetitive discussions in one diagram, including all the potential solutions that we got 80% the way towards then got distracted"
@acegikmo I'm sure you hear this a lot, but you're an absolute treasure to the industry.
Thanks for everything you do and sharing with us all.
@instantarcade thank you <3 I'm glad you feel that way
@acegikmo beautiful. no NURBS?

@papakipos those are B-Splines!

NURBS = Non-Uniform Rational B-Splines

@acegikmo ah true, fair enough. loved your flowchart. so true.
@jm3 Which one is reticulating?
@dokas reticulating splines! This is a Unix system, I know this!