Browse Search Popular Register Upload Rules User list Login:
Search:
Cubic Spline Curve Calculator

Image:
screenshot of the scene

Author: FRA32

Group: Default

Filesize: 82.66 kB

Date added: 2022-07-17

Rating: 7.1

Downloads: 3596

Views: 554

Comments: 9

Ratings: 6

Times favored: 0

Made with: Algodoo v2.1.0

Tags:

Scene tag

I AM ALIVE! Kinda.

This scene is about a topic that has confused me for ages, and I've programmed it once a long time ago.

Splines are a type of interpolation curve, similar to Bezier Curves, that produce smooth curves between the points defining them. This scene specifically is about so called Cubic Splines, which are much more complex than simple Bezier Curves, relying on piecewise cubic polynomials with 4 parameters that need to be calculated each. A further explanation on how they work and what makes them special can be found within the scene.

In this scene I am calculating these splines by using a matrix equation solver, to get the required equation constants straight from the initial set of conditions that define cubic splines. This process is naturally significantly slower than an approach that uses pre-solved equations, but it demonstrates quite nicely where the splines come from. Additionally, this approach is how I originally calculated splines 8 years ago as part of a school project, back when I understood them even less than I do now.

If you like this scene, why not open it within your browser to give it a nice rating? It helps a lot!
Last edited at 2022/07/18 06:39:36 by FRA32
Please log in to rate this scene
edit
Similar scenes
Title: Peano Curve
Rating: 5
Filesize: 71.67 kB
Downloads: 725
Comments: 0
Ratings: 1
Date added: 2020/12/14 16:31:35
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Beziércurve-Drawer
Rating: 5
Filesize: 6.8 kB
Downloads: 314
Comments: 4
Ratings: 1
Date added: 2015/12/12 18:58:25
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Bell Curve Simulator
Rating: 5
Filesize: 218.28 kB
Downloads: 917
Comments: 0
Ratings: 1
Date added: 2020/06/02 08:33:30
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: turbine curve
Rating: 5
Filesize: 229.44 kB
Downloads: 712
Comments: 1
Ratings: 1
Date added: 2019/06/29 15:31:24
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: decimal to 2bit binary
Rating: 5.625
Filesize: 123.58 kB
Downloads: 2045
Comments: 7
Ratings: 2
Date added: 2020/09/08 05:03:02
Made with: Algodoo v2.1.0
Rating: rated 5.6
download
Title: Bezier-Curve Movement Path
Rating: 5.625
Filesize: 17.88 kB
Downloads: 719
Comments: 1
Ratings: 2
Date added: 2015/12/13 15:51:39
Made with: Algodoo v2.1.0
Rating: rated 5.6
download
Nice
Hi FRA32. I'm glad to see that you are still alive (kinda)! LOL
Well, seriously speaking, you do not have a history of producing Algodoo scenes in great abundance, but the few that you did produce are of top quality (both technically and aesthetically). Much of the esoteric subject matter (such as the subject of this current scene) is way over my mathematically-challenged brain, but I often end up learning something from your scenes. I hope you will continue visiting Algobox, and continue posting awesome scenes!

Now, concerning spline curves and Bezier curves can you give a brief explanation as to how these calculations are used in the real world? I assume these curves are used by mechanical engineers to design gears and other such curvy mechanical shapes, but maybe you can elaborate on that.

Although I don't understand much about spline curves, I do have a pretty good feel for how graphical user interfaces should look and work. There are just a couple of suggestions that I have which should improve the look and feel of your scene. The first is contrasting text. Most of your text in the scene is white text over a black background which is easy and comfortable to read, but the green text, on the other hand, is quite difficult to read especially on a smaller computer screen. I suggest maybe making that green text either a brighter shade of green, or yellow, or white, and/or increase the font size.

The other issue is forcing the camera pan and zoom to be locked to specific values in the scene. When the camera pan and zoom were locked, it prevented me from moving and zooming in so that I could read the green text. I had to Pause Algodoo, read the text, and then Run it again. Maybe a better way to handle pan and zoom is to force the values you want for a particular focal point in the scene, but do not "lock" those values. Once the translation and zoom have been done, return control to the user until they click on another arrow to translate again.

Other than those two suggestions, you did a great job on the scene (as usual!).

Keep 'em coming!!!
Last edited at 2022/07/17 21:01:30 by Xray
@Xray I have updated the scene to incorporate your suggestions. Thanks for the feedback!:tup:

To answer your question about real world applications: Bezier Curves are used anywhere where you want a quick and easy adjustable curve. This is anywhere from Art software to create curved lines (Even in MS Paint), to animation software to create smooth transitions between Keypoints.
Now Splines on the other hand find application in more advanced applications. For example they are used to model and approximate data. A much more common example of their use is in 2D and 3D modelling software for creating smooth edges and surfaces, for example when designing the frame of a car, or to create a character for 3D animation. In those cases, you often find an even more complex version of splines called NURBS, which basically combines the approach behind Bezier Curves and Splines to create a really powerfull curve tool that is both smooth and easily adjustable. I might make a scene about NURBS too, once I fully understand just how exactly they work :lol:
A common use for Cubic Splines is calculating paths in real life. Rollercoasters, train tracks, anything where accelleration is important might have been made using Cubic Splines to achieve that smooth transition between segments. After all, you don't want to ride a rollercoaster and have the path suddendly change in curvature, the sudden change in force caused by that would knock you back and forth!:o
Reticulating Splines!
FRA32 -- Thanks for the real-world examples. Now I can relate this scene to things that I am familiar with.

I downloaded the scene, but I do not see the changes that you said you made to it. The green text is still green, and the camera pan and zoom are still locked. :huh:
Last edited at 2022/07/17 22:42:13 by Xray
I dont know what this does but it sure looks cool. :)
@Xray seems like uploading a scene by editting it in browser does not work as I hoped it would. That or I did something wrong lol.
Either way, it is fixed now!
Bravo! Good job! :tup:
Looking good.:tup: