# Temporal Curves

benpaulthurston shared this question 5 years ago

I found this way to find a path through some points I called a temporal curve. If anyone's interested I can explain how I solve for the constants matrix for different numbers of points...,

My question is what are the types of points geogabra uses called, The formula above works in any number of dimensions but I don't know how to explain that the same formula for t is applied to each coordinate axis the way geogabra does curves, I'm just missing some vocabulary to look up online to use when explaining this idea...

1

Create points A,B,C,D,E, then

1. f(x)=Polynomial[Zip[(a,x(R)),R,{A,B,C,D,E},a]]
2. g(x)=Polynomial[Zip[(a,y(R)),R,{A,B,C,D,E},a]]
3. (f(t),g(t)),1<t<5

https://www.geogebra.org/m/k4X3MSgf

1

Thanks for the reply! The type of curve you generated and the one I'm talking about behave differently, for example yours doesn't equal exactly B at t=2 but a value nearby, I don't know how you made the web geogabra file yet but here's one so you can see at t=0,1,2,3,4 this curve equals A,B,C,D,E respectively...

1

hello

it is clear for me that both methods make the same curve. In attached file I see that the calculus has the difference in t

in blue t=0,1,2,3,4

in red t=1,2,3,4,5

saludos

1

Oh I see that's interesting thanks for that input. I do notice one thing though and that is that when a point moves my curve only has to be reevaluated, while the other has to recalculate all the coefficients and then reevaluate, I think that involves solving a system of linear equations that is O(n^3) to get the coefficients...

1

I guess you sort of save the results of solving the system of linear equations in that matrix I have in my first graphic so you can reuse that calculation no matter how the five points change

1

the two methods recalculate the coeficients. moving the A point is clear. more, the calculus are equivalent

I can explain it better in spanish. you solve a matricial equation with a Vandermonde matrix and Zbynek use polynomial[] (Lagrange's polynomial). the picture from wikipedia can illustrate this fact. see the red marks.

1

Right his polynomial[] command takes some time to calculate coefficients, whereas if you look at the formula for mine, it only needs to be reevaluated (changing a points value and evaluating at each t value)

1

This is a part 2 showing you can change the left row vector to a different basis... They have to be at least linearly independent, not sure any other restrictions...

1

here's a file for the 2nd curve

1

hello

1

Sorry I didn't see the attachment, thanks for showing me that, but I think the fit command you used still need O(n^3) to figure the coefficient whereas the matrix formula only has to be evaluated...

1

Some multiplication rules.,.

1

if you use f4(t),f3(t),f2(t),f1(t),f0(t) you only need the inverse of matrix M being M the matrix

1. f4(0),f3(0),f2(0),f1(0),f0(0)
2. f4(1),f3(1),f2(1),f1(1),f0(1)
3. f4(2),f3(2),f2(2),f1(2),f0(2)
4. f4(3),f3(3),f2(3),f1(3),f0(3)
5. f4(4),f3(4),f2(4),f1(4),f0(4)

I do not remember the order of this calculus

ceartainly GG repeat the calculus for each Fit[] command but I do not know if the calculus is longer in time

saludos

1

Right I meant to post this, this is the Maple command to find the matrices:

I'd be grateful if you could find a way to do this in Geogabra I love this program and I'd like to remove Maple from my workflow entirely...

1

sorry corrected version

1

One more try corrected version...

1

Once more all together now...

1

Don't know if there is a easier way, CAS-Code:

1. C := { c_{0} , c_{1} , c_{2} , c_{3} , c_{4} }
2. T := { t^4 , t^3, t^2 , t^1 , t^0 }
3. P := { P_{0} , P_{1} , P_{2} , P_{3} , P_{4} }
4. F := Element[ T Transponse[ C ] , 1 ]
5. E := Sequence[ Substitute[ F , t , i ] = Element[ P , i+1 ] , i , 0 , 4 ]
6. S := RightSide[ Element[ Solve[ E , C ] , 1 ] ]
7. M := Sequence[ Sequence[ Derivative[ Element[ S , i+1 ] , Element[ P , k+1 ] ] , k , 0 , 4 ] , i , 0 , 4 ]

1

For Curve insert this into the CAS:

1. P_{x} := {{ x(P_{A}) , x(P_{B}) , x(P_{C}) , x(P_{D}) , x(P_{E}) }}
2. P_{y} := {{ y(P_{A}) , y(P_{B}) , y(P_{C}) , y(P_{D}) , y(P_{E}) }}
3. X(t) := Element[{T} M Transpose[P_{x}], 1,1]
4. Y(t) := Element[{T} M Transpose[P_{y}], 1,1]

And this regular:

1. K = Curve[X(t), Y(t), t, 0, 4]

1

For some reason the commands where wrong and editing is not allowed, here the file.GGb is to weak to solve the matrix in case of an exp(-1/k t^2) base.

1

hello

I think you can do the same steps in CAS of GG, defining each equation with substitute[], solving them with solved[] and creating the curve

but I tink that GG has its own style so I think this is the simpler steps for doing the curve

the calculus of inverse spend a time

saludos

1

just to show this works with surfaces too!

1

Fixed a couple things with the graphic...