This is the first on what will be a series of posts showing the math behind commonly used formulas in graphics programming. In this post, we’ll take a vector (or a point) and rotate it by some amount about an origin. Take a look at the following diagram, rendered expertly below.
Here we have the original vector, before its been rotated. It sits at the coordinates (x, y). It has an angle alpha, and is a fixed distance r from the origin.
With the growing popularity of daily word games, I threw my hat in the ring this past November and made Crossletters. Each day, there’s a new set of 7 letters, along with clues to lead you to words consisting of just those letters. Creating the game was a lot of fun, as was sharing it with my friends. However, by the time I finished the project I still had two major unresolved problems.
Not interested in reading any of this? You can play Crossletters at jacksontheel.com/crossletters or find the source code on Github
There’s nothing like being stuck in an airport to get you spending your hard-earned money. A cup of coffee might cost you ten bucks, an ordinary cheeseburger, twenty. Airport vendors know you’re without options, so they fleece you for as much as they can.
And when you’re sat waiting for your flight, maybe still hours out, you might find yourself spending money for digital goods too.
Imagine you find yourself in a heated game of tic-tac-toe. Plotting your moves, you need to remember that each move you make should either get you closer to the win condition or move your opponent further from it. Of course, your opponent is going to be doing the same thing for each of their moves. While you can’t control how your opponent places their pieces to hinder you, each move has an effect on the options for the next player’s move.
Before I began my journey in learning Rust, I had been warned of its steep learning curve. Undeterred, I started following through some trivial examples in Rust’s (incredible) documentation. Things seemed intuitive, I really wasn’t seeing the difficulty people were warning me about.
That was until I tried something less trivial. I decided to build a simple recursive descent parser in Rust, thinking I should be able to have something thrown together in an afternoon.