Applying the Curve… to Sorting.

Whoops... I think I just went on a tangent.

Applying the Curve… to Sorting.

So this is my second post using the Bézier curve, which has been really fun to play with so far. Unfortunately, last time (1+ week ago) I wasn’t able to figure out what on earth to do with the curve. Not so much fun. However – with an idea from my teacher – I applied it to showing sorting algorithms! Yay!

To give some background: I take VCE Software Development. In VCE Software Development, we have to do some sorting algorithms – particularly Selection Sort and Quick Sort. I went beyond that. Last year, I completed all the programming practice, concepts & tasks we needed to do in programming this year (even though I still have to do the stuff this year as well). Last year (and you may find this on my GitHub), I wrote a program to “benchmark” sorting and searching algorithms. Because of my preference of C# as a language, and the fact our class must use VB.NET, the project is split between the two languages. The majority of the project is written in VB.NET, including the sorting algorithms. This year, I decided to extend sorting a little bit.

I wrote a program that effectively pre-computes all the values for the Bézier curves, and renders them on animations based on each sorting algorithm. The result is… pretty awesome.

You may see a full start-to-finish demonstration below:

I’ll provide the code for this program on my GitHub fairly soon.


This project was a little more to do with programming, rather than experimenting with the maths side of things. Because I already knew the formula for each curve, I could just render each without too much trouble. The issue, with this, however, was getting the speed to be fast enough to be well… worth watching.

Thanks everyone! If you liked this post please let me know, and share it with your friends. Got a question? Feel free to send a message! I’ll get back to you ASAP.

Leave a Reply

Your email address will not be published. Required fields are marked *