This is true in almost any context involving 2D/3D graphics, not just for this particular example. It's much more efficient than trying to sit there and think through the math or figure out what does what. But of course you learn less that way, so it's a tradeoff. And sometimes it's less efficient if there are too many combinations to efficiently bruteforce, or if it takes too long to test each iteration. But we live in the age of rapid-iteration javascript.
(I still remember how people would describe trig in high school, it is a wonder more teachers didn't explain the cos = x, sin = y thing. Probably because my teachers did not understand math.)
Heh. Yeah, that matters.
In my experience, US highschools are very much "Okay class, today we're going to memorize these formulas."
One of them explained the x/y thing, another didn't.
We went through the unit circle derivation in the 8th grade and were thus showed why cos is conventionally x and sin conventionally y.
Note that my experience involved going to a supposedly "good" school district. There is the entirely unrelated problem of schools varying in quality based on where you live.
... and the top comment is typical negative nitpicking!
Why HN? Why?! There must be a better way!
We're encouraged here to post things that add value. But that pretty much implies either criticism or going off-topic ("hey, I've seen something similar here:", etc.). There is no practical value in "positive" comments, no matter how elaborately you can write "I liked it". Yes, it will make everyone feel a little bit better, but it hardly contributes anything of value to anyone.
Not every criticism is a valuable feedback, but every valuable feedback is a kind of criticism. And I think the best thing about HN is that it has lots of civil nitpicking (usually followed by interesting discussions), instead of circle jerks and compliments.
ETA
> Why HN? Why?! There must be a better way!
There is: it's to stop taking criticism so personally and instead extract as much value from it as one can, and discard the rest. I find it to be a good attitude for life in general, not just HN.
But here is where I disagree:
>... but it hardly contributes anything of value to anyone...
>... every valuable feedback is a kind of criticism...
Valuable feedback includes positive as well as negative. Negative is actionable feedback, but positive has just as much value in a different way.
Most people are aware that their own perceptions, thoughts, and ideas may be flawed. Negative feedback points out those flaws and should always be accepted. Positive feedback says that in spite of the flaws, there is something fundamentally worthwhile there.
And while upvotes can certainly serve as a form of positive feedback, words are even better.
I'm not suggesting that we should all post meaningless words of encouragement to everything that comes along. But if you're impressed by something you see, saying so only helps.
I guess "actionable feedback" was the phrase I was looking for.
> I'm not suggesting that we should all post meaningless words of encouragement to everything that comes along. But if you're impressed by something you see, saying so only helps.
Agree 100%. It's always nice and reassuring to get some positive feedback :).
It's an astonishingly clever piece of self-reproducing code. Did you miss the code and think it was just a crappy animation of the earth?