Live data from Hacker News

Animations From First Principles (in 5 minutes)

mathspp.com

1–10 of 18 posts

Re: Animations From First Principles (in 5 minutes)

#2
Hey there, OP here.

I jotted down some thoughts on how I think about (simple) animations and how to create them with some programming (in Python). I'd love to hear your thoughts on my write up and also what directions you suggest I take these personal explorations in.

Re: Animations From First Principles (in 5 minutes)

#8
post #4

This is very accessible. With a few tiny changes it could run in JS in the browser, in a fiddle or something. Then reader could tweak the code and see changes without having to run pygame.

That’s a great suggestion. People could immediately see what they’re drawing!

Re: Animations From First Principles (in 5 minutes)

#9
post #3

I like clarity of your examples. You could draw an inspiration from Daniel Shifman's book "Nature of code" ( https://natureofcode.com/book/ ) - see chapters 2 and 3 for instance.

Thanks for the reference! I don’t know this book but I’ll take a look!

Re: Animations From First Principles (in 5 minutes)

#10
Looks really nice. A few things that I think might make the presentation a bit clearer:

1. Using polar coordinates makes the maths a lot cleaner than using Cartesian coordinates. However you then either need to explain polar coordinates, or you assume people remember polar coordinates from high school which is often not the case in my experience.

2. I think the positioning of the points is a little bit opaque. I was expecting to see (r * cos theta, r * sin theta) and it took me by surprise to see an addition in there. Either just noting that stupid computer graphics libraries don't put the origin at the center, or adding that translation later (which is a chance to talk about function composition) might be beneficial.

(I've written my own take on this same topic, starting at http://www.creativescala.org/creative-scala/polygons/ It will take a little bit more than 5 minutes to get through it :-) It's really fun and you can do a huge amount with parametric curves.)

Post reply on HN