(Note: Twitter links have screenshots next to them, as it’s notoriously difficult to predict what Twitter shows on the other end of a link.)
Update History:
What do I remember about the coronavirus pandemic?
I remember watching case numbers double and redouble throughout late February and early March, thinking “oh god, we’re only a few doublings behind Italy, and our leaders are going to drop the ball”.
Read more...I was playing around with codeworld-api
recently, and found myself with a pair of interesting problems:
Picture
) onto the canvas; andPlacing the picture is easy — codeworld-api
provides two
functions that do exactly what I want:
translated :: Double -> Double -> Picture -> Picture
scaled :: Double -> Double -> Picture -> Picture
Going the other way is more difficult. After noodling around on paper trying to compute the inverse transform, I remembered that these transformations could be represented as 3x3 matrices (Wikipedia has some examples), and that inverting a 3x3 matrix is easy (provided that the affine transformation it represents hasn’t collapsed the space).
This means I have to compute the transformation twice: once as
codeworld-api
calls, and once as matrices. Or do I?