TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Animations From First Principles (in 5 minutes)

108 点作者 RojerGS超过 1 年前

9 条评论

noelwelsh超过 1 年前
Looks really nice. A few things that I think might make the presentation a bit clearer:<p>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.<p>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&#x27;t put the origin at the center, or adding that translation later (which is a chance to talk about function composition) might be beneficial.<p>(I&#x27;ve written my own take on this same topic, starting at <a href="http:&#x2F;&#x2F;www.creativescala.org&#x2F;creative-scala&#x2F;polygons&#x2F;" rel="nofollow noreferrer">http:&#x2F;&#x2F;www.creativescala.org&#x2F;creative-scala&#x2F;polygons&#x2F;</a> It will take a little bit more than 5 minutes to get through it :-) It&#x27;s really fun and you can do a huge amount with parametric curves.)
评论 #37430776 未加载
throwaway5947超过 1 年前
Not to be confused with “the twelve”:<p><a href="https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;Twelve_basic_principles_of_animation" rel="nofollow noreferrer">https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;Twelve_basic_principles_of_a...</a>
toppy超过 1 年前
I like clarity of your examples. You could draw an inspiration from Daniel Shifman&#x27;s book &quot;Nature of code&quot; (<a href="https:&#x2F;&#x2F;natureofcode.com&#x2F;book&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;natureofcode.com&#x2F;book&#x2F;</a>) - see chapters 2 and 3 for instance.
评论 #37430013 未加载
RojerGS超过 1 年前
Hey there, OP here.<p>I jotted down some thoughts on how I think about (simple) animations and how to create them with some programming (in Python). I&#x27;d love to hear your thoughts on my write up and also what directions you suggest I take these personal explorations in.
bmer超过 1 年前
I do not understand how this is from &quot;first principles&quot;?
评论 #37430519 未加载
评论 #37429072 未加载
评论 #37432353 未加载
tantalor超过 1 年前
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.
评论 #37430006 未加载
danbruc超过 1 年前
Drawing a circle by drawing circles - tiny ones, they will just look like single pixels - might be confusing to some, including me. I would suggest connecting adjacent points with lines, that is conceptually not really harder than just drawing the points and it will always give you a complete curve even if a step jumps across a couple of pixels.
ttfkam超过 1 年前
Not to be confused with the 12 principles of animation.<p><a href="https:&#x2F;&#x2F;youtu.be&#x2F;uDqjIdI4bF4" rel="nofollow noreferrer">https:&#x2F;&#x2F;youtu.be&#x2F;uDqjIdI4bF4</a><p>mathspp.com will help with making an animation programmatically. The video I linked will help the animation be more compelling for the viewer.
HanClinto超过 1 年前
Looks great! Really nicely illustrated!