Advertisement

non linear incrementals (forward differencing)

Started by August 03, 2002 01:47 AM
9 comments, last by Fyre_dragenn 22 years, 6 months ago
(Mind the grammar, english is not my strong point) I''ve read some math on how to increment through the points of a bezier curve using only adds, but l was overwhelmed by the math. The math behind the equation was given but not explained. Can anyone please lend a hand. It had something to do with derivatives.
As far as I can remember, bezier curves are third degree polynomials. You should have mentionned how familiar you are with derivatives... I'm going to shoot a few examples, and hopefully, you'll catch up:
x | y = 3x |        |0 |   0    |    +3  |1 |   3    |    +3  |2 |   6    |    +3  |3 |   9    |        |  
The derivative is the diference between f(x) and f(x-1). Since y = 3x is a polynomial of degree 1, the first derivative is constant (+3). Hence, instead of using y = 3x at each step, we can use y = y + 3 (in programming, of course). If the polynomial is of degree 2,
x | y = 3x²|        | 0 |   0    |    +3  | +61 |   3    |    +9  | +62 |   12   |    +15 |3 |   27   |        |  

Since it is a polynomial of degree 2, the second derivative (+6)is constant. Hence, if we say that a is our first derivative, we can say that, at each step, a = a + 6, and y = y + a.

With a second intermediary variable, we could have a polynomial of third degree with only increments.

Hopefully, this makes some sense. It's 3:00 am over here and I wanna sleep, but I have some work to do, that I want to post-pone at all cost...

Bluarg,

Cédric

EDIT: Lojkloooo

[edited by - cedricl on August 3, 2002 3:11:58 AM]
Advertisement
Well, to tell the truth... I''m pretty basic, but give me some time to look over your code... it''s slowly starting to make sense
Ok. If you have any questions, just ask. I''ll be here ''till the sunrise.
quote:
Original post by cedricl
The derivative is the diference between f(x) and f(x-1).



Just a quick point to hopefully avoid confusion at a later time, cedricl is, of course, referring to an approximation to the derivative at f(x), using a backwards difference method: f(x)-f(x-1).

Cheers,

Timkin
One last queastion, how do you find the initial value. If you plug in the equation using derivatives then the equation doesn''t equal 3. I''m still confused. I can do the math, but l still don''t have a starting point. For instance my head explodes if l start x = 0.25f.
Advertisement
One last queastion, how do you find the initial value. If you plug in the equation using derivatives then the equation doesn''t equal 3. I''m still confused. I can do the math, but l still don''t have a starting point. For instance my head explodes if l start x = 0.25f.
One last queastion, how do you find the initial value. If you plug in the equation using derivatives then the equation doesn''t equal 3. I''m still confused. I can do the math, but l still don''t have a starting point. For instance my head explodes if l start x = 0.25f.
You''re thinking about the anti-derivative. While there''s a whole lot of theory you should be learning first, especially the Fundamental Theory of Calculus, you can search Google for "anti derivative". There''s shortcuts used to find the derivative and anti-derivative of equations. But eventually you will have to learn Calculus if you continue exploring these.
I don''t understand what you mean by ''initial value''. The initial value is the first point used to generate the curve... Could you be more explicit?

This topic is closed to new replies.

Advertisement