Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1996
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1996

[Date Index] [Thread Index] [Author Index]

Search the Archive

Length of cubic polynomial (spline) ?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg4886] Length of cubic polynomial (spline) ?
  • From: "Julian Bushell" <jbush at globalnet.co.uk>
  • Date: Thu, 26 Sep 1996 22:42:34 -0400
  • Organization: Inspira Limited
  • Sender: owner-wri-mathgroup at wolfram.com

I have a computer problem.

I need to know the length of a cubic polynomial.

I'm actually using Catmull-Rom splines to describe the path of an object
with a known velocity.
I need to be able to travel along this spline a given distance for each
frame.


                                      /  P(i-1) \
                C(t) = [t³ t² t 1] B  |  P(i)   |
                                      |  P(i+1) |
                                       \ P(i+2) /

where P is the interpolated points and B is the matrix

               / -0.5  1.5 -1.5  0.5 \
        B =    |  1.0 -2.5  2.0 -0.5 	|
               | -0.5  0.0  0.5  0.0  |
               \  0.0  1.0  0.0  0.0 /

Equation form

C(t) = (-0.5*t³ + 1.0*t² - 0.5*t) * P(i-1) +
       ( 1.50*t³ - 2.5t² + 1.0) * P(i)   +
       (-1.5*t³ + 2.0*t² + 0.5*t) * P(i+1) +
       (0.5*t³ - 0.5*t²)* P(i+2)

Since P are constant numbers. Polynomials in x and in y can be formed.

I need to know the length of the curve for any t value (especially the
entire length i.e. from t=0 to t=1).

Please note that this is required for real-time computer processing so
speed is essential.

Any help will be much appreciated, thank you.



jbush at globalnet.co.uk


==== [MESSAGE SEPARATOR] ====


  • Prev by Date: Help - Compile[] problems
  • Next by Date: Re: Slowdown of MMA running WIN95 and what to do about it
  • Previous by thread: Help - Compile[] problems
  • Next by thread: Re: Slowdown of MMA running WIN95 and what to do about it