To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 10335
10334  |  10336
Subject: 
Tweening (and some Backwards Engineering)
Newsgroups: 
lugnet.cad.dev
Date: 
Fri, 11 Nov 2005 23:45:03 GMT
Viewed: 
3334 times
  
I've been thinking a little about Tweening the last two weeks.
Linear Motion Tweening between two keyframes is very simple I guess.
If x(0)=50 and x(1)=250, then x(0.1)=50+(250-50)*0.1=70. "kx+m".

But then I came to the rest of the LDraw Type 1 Line. Those variables I call 'a'
though 'i'.
1 c  x y z  a b c  d e f  g h i  object.dat

For example: let's say this is a door i closed position. pos(0)
1 16  0 0 0  1 0 0  0 1 0  0 0 1  door.ldr
And here it is wide open, pos(1):
1 16  0 0 0  -0.174 0 0.985  0 1 0  -0.985 0 -0.174  door.ldr

Now, I can't just take the difference between a(0) and a(1) and divide it into
the number of frames I wish to use to open the door. I need to calculate the
angles at pos(0) and pos(1) and then the difference between them. (I know it's
100 degress, because I can easily rotate an object in the LDraw matrix). But I
don't know how to engineer it backwards. How will I make a program aware of that
in this case the difference between the y-axis rotation is 100 degrees?

And to make it more complicated: it has to recognize x and z rotation as well -
in the same tweening.

And, even more complicated than that. The object may be a stretched or sqeezed
(elastic [rubber] objects or as comical animation effects)

When this difference between angles is calculated, I think it's easy to create a
Linear Rotation Tweening.

Now, I need help to find the formulas to calculate the rotation angles from the
LDraw matrix. I think the output will be:
At pos(0) 0 0 0
At pos(1) 0 260 0
But how do I get there...?


/Tore



Message has 1 Reply:
  Re: Tweening (and some Backwards Engineering)
 
(...) Hi Tore, Finding the angles is quite complicated and depends on the choice of how you express the angles. The main way of expressing an angle are Euler angles ((URL) however there is another way to express angles which is slightly more (...) (19 years ago, 12-Nov-05, to lugnet.cad.dev)

Message is in Reply To:
  Re: Thoughts on File Format for LDraw Animation
 
(...) This menas a huge download every time you wish to updated? <snip> Your project is in deed very interesting. I will try to follow the progress, and someday maybe I'll join it! But for now, I will explore where the LDA project leads. (...) Well, (...) (19 years ago, 30-Oct-05, to lugnet.cad.dev)

30 Messages in This Thread:







Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR