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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Cubic Bézier: From Math to Motion

43 点作者 extesy超过 3 年前

5 条评论

ogogmad超过 3 年前
You can derive the formula for this using the Chinese Remainder Theorem.<p>Consider the problem of finding a polynomial p(x) such that p(x_i) = y_i for some finite set of (x_i) and (y_i). The classic approach to this is <i>Lagrange interpolation</i>, which can be seen as a special case of the Chinese Remainder Theorem. Essentially, you are trying to find a p which satisfies the following modular congruences:<p><pre><code> p(x) == y_i (mod (x - x_i)) </code></pre> The constructive proof of CRT, specialised to this problem, yields an algorithm equivalent to Lagrange interpolation. To extend Lagrange interpolation so as to include derivative information y&#x27;_i at each x_i, change that congruence to:<p><pre><code> p(x) == y_i + y&#x27;_i (x - x_i) (mod (x - x_i)^2) </code></pre> And to give second derivative information, change the modular congruence to:<p><pre><code> p(x) == y_i + y&#x27;_i (x - x_i) + y&#x27;&#x27;_i (x - x_i)^2 &#x2F; 2! (mod (x - x_i)^3) </code></pre> And so on...
评论 #29533766 未加载
tsumnia超过 3 年前
Bezier curves are actually my favorite way to teach recursion. They give a nice visual representation of what&#x27;s happening, the base case is pretty straight forward, and so is the math. The time-step element adds just enough extra complexity to take it beyond &quot;let&#x27;s sum a list&quot; or &quot;check if a string is a palindrome&quot;.
cobbal超过 3 年前
For a really in-depth, online resource on Bézier curves, I constantly consult <a href="https:&#x2F;&#x2F;pomax.github.io&#x2F;bezierinfo&#x2F;" rel="nofollow">https:&#x2F;&#x2F;pomax.github.io&#x2F;bezierinfo&#x2F;</a>
tobmlt超过 3 年前
If you happen to desire to implement your own NURBS library, (and&#x2F;or the bspline and bezier simplifications) take the nurbs book c reference implementation, and modernize, convert to you language of choice.<p><a href="https:&#x2F;&#x2F;link.springer.com&#x2F;book&#x2F;10.1007&#x2F;978-3-642-97385-7" rel="nofollow">https:&#x2F;&#x2F;link.springer.com&#x2F;book&#x2F;10.1007&#x2F;978-3-642-97385-7</a>
thecrims0nchin超过 3 年前
Grant Sanderson (3blue1brown) had a video submission contest and the winner that blew me away did a video on bezier curves. <a href="https:&#x2F;&#x2F;youtu.be&#x2F;aVwxzDHniEw" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;aVwxzDHniEw</a>