Skip to content

Obtaining curve equation #1

Answered by ChevronOne
nahroge asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, the fitting function fits cubic-Bézier curves, it returns four control points (P0 to P3) for each curve and by which the equation of the curve C is then defined as follows:
https://bit.ly/39LnG93 "C(t) = \sum_{i=0}^{n}\binom{n}{i} (1-t)^{n-i}t^{i}P_i"
where and the curve is defined only in t \in [0,1]. For cubic curves n=3.
This can simplified further to https://bit.ly/3wFIBBZ "C(t)=(1-t)^{3}P_{0}+3(1-t)^{2}tP_{1}+3(1-t)t^{2}P_{2}+t^{3}P_{3}, 0\leq t\leq 1"
"if the equations above did not render properly, you can copy-paste them in a proper latex renderer".
Also if you're not familiar with Bézier or parametric curves in general, here's a quick introduction. The Wikipedia article on the subject…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@nahroge
Comment options

Answer selected by ChevronOne
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants