How a proper approach can make a huge difference and a red flying triangle
- Filip Walczak

- Apr 8, 2020
- 2 min read
Updated: Apr 10, 2020
A few days ago I had a rather lazy morning. You know, cereal, coffee and definitely too much time. In search of something interesting to watch on YouTube I came across a playlist about linear algebra, made by 3Blue1Brown - my go-to content creator when it comes to math related stuff.
After watching the first episode I was impressed that it was in fact quite interesting and I understood more than I've expected to. A few episodes later I was amazed at how much more clearer everything was after I though about it more as a tool than can help me understand and/or achieve certain things rather than a random subject which I need to know to pass exams.

My fabulous notes
It may be basic knowledge for some, but I was pleasantly surprised when I managed to calculate values used to rotate objects in 2D space on my own and then used them in Unity to rotate a cube.
private Vector2 BaseVector = new Vector2(1,1);
private float time = 0;
void Update()
{
time += Time.deltaTime;
transform.position = GetRotationVector(BaseVector, time * 5);
}
private Vector2 GetRotationVector(Vector2 vector2 ,float x) {
return new Vector2(
(vector2.x * Mathf.Cos(x)) - (vector2.y * Mathf.Sin(x)),
(vector2.x * Mathf.Sin(x)) + (vector2.y * Mathf.Cos(x)));
Oh such a stupid, yet satisfying view
After a few more episodes i came up with an idea that I would like to learn more about things happening under the hood of game / graphics engines. As i'm also learning C++ lately while doing reverse engineering projects (about this some other time) I've decided to try some OpenGL in C++. After watching a few tutorials from The Cherno (I recommend checking him out if you want to learn about C++ and game engines) I can say right away that it's easier said than done 😄
As of today my OpenGL skills are limited to a red triangle doing some fancy rotations (wow!)
Someone I know once said that a good programmer should write his own engine as its a great way to improve your programming skill. Who knows, maybe one day I'll write my own engine?
Until next time and remember - many topics are much more interesting when you study them on your own than when you learn them at school.



Comments