Entry

Bezier curves & Rust

Hello! I have totally not forgotten about this lol ;D. I have just been rather busy with school :( but now that I have free time again I am updating this dead blog.

Bezier Curves: Just the coolest lines to ever exist.

So since I find bezier curves to be really cool, I thought that I might as well try make a programme that creates them, and since I was learning rust and needed a project to test my skills on, well it was a no-brainer.

I have already created a bezier curves programme before, although it was using Delphi (the only reason that I used it, is that it is what is taught in IT at school, idk - the curriculum is old) and a rather inefficient algorithm, De Casteljau’s algorithm. I was just messing around then and it was how I ended up solving my problem. However now that I kind of know what I am attempting, I rather used the explicit definition that I found on Wikipedia B(t)=∑i=0n(ni)(1−t)n−itiPiB(t) = \sum_{i=0}^{n} \begin{pmatrix} n\\i \end{pmatrix} (1-t)^{n-i} t^i P_i This allowed me to have more efficient, and fewer lines, programme.

I also spent longer than needed trying to get text to render on the window - as I manually created each glyph and then created a text renderer to render my weird font.

This was all very useful in helping me learn how to actually code Rust though since before I was only doing Rustlings online on Rustfinity.

Link to repo

Thanks for reading :D

← back to the index