Welcome, Guest. Please login or register.

Author Topic: Mathmatic genies click here --> a Puzzle needs to be solved!  (Read 2594 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline LPTopic starter

  • Sr. Member
  • ****
  • Join Date: Jan 2003
  • Posts: 358
    • Show only replies by LP
    • http://bailout.dk
So guys...

I'm in a bit of trouble here... I really need someone to give me a mathmatic formular for the following problem (If possible with the possible lack of information):

I've got to animate a dragon so it walks across a 740x486 screen... Cool...

It has to be done in 200 frames... Cool...

The dragon comes from non-visibility -> then goes across screen -> then disapeares into non-visability again... Cool...

The dragon is just as long as the screen (486pix)... Cool...

I've decided that one step should take approx. 20 frames... Cool...

I need to know how many steps the dragon has to take to do a full screen pass in 200 frames...

-Or even better!: A formular were I get X as the number of frames to use for one "step-routine" (From A to B were I can circle the whole anim so it looks like the dragon walks... A-B-A-B-A-B etc.)

-I don't know if this is complete bull to you but at least I tried explaining it...

-Thanks!
 

Offline seer

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 1453
    • Show only replies by seer
Re: Mathmatic genies click here --> a Puzzle needs to be solved!
« Reply #1 on: July 23, 2003, 09:05:15 PM »
The dragon is just as long as the screen (486pix)... Cool...

Shouldn't that be 740 ?

Anyway, it depends on the length of the dragons legs, and how it is jointed.. Try to get some movies from different animals, giraffes, horses, aligators..  Get some inspiration from that..
~
Everything you say will be misquoted and used against you.
~
 

Offline Hardboy

  • Full Member
  • ***
  • Join Date: Feb 2002
  • Posts: 248
    • Show only replies by Hardboy
Re: Mathmatic genies click here --> a Puzzle needs to be solved!
« Reply #2 on: July 23, 2003, 09:06:50 PM »
Here goes:

If the dragon fades in and out while walking:

(Total # of Frames)/(Frames/Step) = # of Steps

If the dragon seperately fades in, walks, fades out, then:

(Total # of frames - fading frames)/(Frames/Step) = # of Steps

Also, this could be relevant:

(Horizontal Resolution)/(# of Steps) = (Horizontal pixels/Step)


 

Offline seer

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 1453
    • Show only replies by seer
Re: Mathmatic genies click here --> a Puzzle needs to be solved!
« Reply #3 on: July 23, 2003, 09:11:47 PM »
Ah.. Those kind of steps.. I knew that, honest.. :-D
~
Everything you say will be misquoted and used against you.
~
 

Offline Wain

  • Hero Member
  • *****
  • Join Date: Sep 2002
  • Posts: 745
    • Show only replies by Wain
Re: Mathmatic genies click here --> a Puzzle needs to be solved!
« Reply #4 on: July 23, 2003, 09:15:34 PM »
I may be misunderstanding, but are you saying that the dragon essentially starts completely off the screen, and then animates it's way onto and then completely across the screen until it is completely off again on the other side??

If so, than it's just dragonwidth*2 (for each side) pixels + screenwidth ( which will give you the pixel count of the dragon completely off on each side of the screen, and size of the screen itself)

then take the result and divide it by 200 to see how many pixels the dragon should traverse  per frame over 200 frames.

or, more accurately

(dragonwidth + screenwidth + dragonwidth) / number_of_frames_used_in_crossing

will give you how many pixels each frame should advance the dragon by.

If you already know how far the dragon advances in each frame, and you're just trying to figure out how many frames it will take to get from one end to the other it's

(dragonwidth + screenwidth + dragonwidth) / number_of_pixels_advanced_per_frame

will give you how many frames are necessary to move the dragon from one end to the other, divide that result by the number of frames per step(20) and you'll have the resulting number of steps necessary to get the dragon completely off-screen from one side to the other.

It is also quite possible that I have completely misunderstood your question and am visualizing this improperly.
Professional Expatriate
 

Offline LPTopic starter

  • Sr. Member
  • ****
  • Join Date: Jan 2003
  • Posts: 358
    • Show only replies by LP
    • http://bailout.dk
Re: Mathmatic genies click here --> a Puzzle needs to be solved!
« Reply #5 on: July 23, 2003, 10:37:56 PM »
@seer

Sorry yeah I mistyped it there I ment 720!
-And trust me I've watched more that one movie to get that thing moving (Sounded quite porno) :-)

@Wain
You have understood me!
-Thank you!

@Hardboy
Where from in København? +Thanks

I know it's a bit of a clumsy explain but the answers you've come up with is great and will work for me (I'm bad with setting up my own formulars as you might see!?)

Thanks a bundle dudes!
 

Offline Doobrey

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 1876
    • Show only replies by Doobrey
    • http://www.doobreynet.co.uk
Re: Mathmatic genies click here --> a Puzzle needs to be solved!
« Reply #6 on: July 23, 2003, 10:48:01 PM »
Quote

I've decided that one step should take approx. 20 frames... Cool...
I need to know how many steps the dragon has to take to do a full screen pass in 200 frames...

Have I missed something obvious...
 Isn`t it just a matter of totalframes/stepframes ??
 200/20 = 10 steps.
On schedule, and suing
 

Offline LPTopic starter

  • Sr. Member
  • ****
  • Join Date: Jan 2003
  • Posts: 358
    • Show only replies by LP
    • http://bailout.dk
Re: Mathmatic genies click here --> a Puzzle needs to be solved!
« Reply #7 on: July 23, 2003, 11:00:31 PM »
@Doobrey

Sorry I think it's my bad explaining again...
My overall idea was to get pixel lengths/frames not actual steps...

:-(
 

Offline mdwh2

  • Hero Member
  • *****
  • Join Date: Jun 2002
  • Posts: 565
    • Show only replies by mdwh2
Re: Mathmatic genies click here --> a Puzzle needs to be solved!
« Reply #8 on: July 23, 2003, 11:01:27 PM »
@Wain

Isn't it dragonwidth + screenwidth, and not dragonwidth*2 + screenwidth?

The dragon has to move a distance equal to its width so that the left end of the dragon reaches the left side of the screen (assuming we're going left to right). Then it has to move a distance equal to the screen width so that the left end of the dragon reaches the right side of the screen - and then we're done.
 

Offline LPTopic starter

  • Sr. Member
  • ****
  • Join Date: Jan 2003
  • Posts: 358
    • Show only replies by LP
    • http://bailout.dk
Re: Mathmatic genies click here --> a Puzzle needs to be solved!
« Reply #9 on: July 23, 2003, 11:22:45 PM »
I think Wain is right because first we have the whole length of the dragon outside the screen to the left, then the walk across and finally the length of the dragon outside on the right side...
so it's actually 3*DragonWidth as far as I have understanded...

 

Offline mdwh2

  • Hero Member
  • *****
  • Join Date: Jun 2002
  • Posts: 565
    • Show only replies by mdwh2
Re: Mathmatic genies click here --> a Puzzle needs to be solved!
« Reply #10 on: July 24, 2003, 12:03:58 AM »
I'm rather tired so I may certainly be missing something here.. ;) but:

I realise that the total distance we are dealing with is 2*dragonwidth + screenwidth. But I presume that the dragon is already starting with its nose up against the left edge of the screen; it's not like the dragon starts off *before* this region of width 2*dragonwidth + screenwidth. Any given point on the dragon only moves the distance of the dragonwidth, plus the screenwidth
 

Offline Peggus

  • Full Member
  • ***
  • Join Date: Apr 2002
  • Posts: 134
    • Show only replies by Peggus
    • http://snow.prohosting.com/vkingboy/
Re: Mathmatic genies click here --> a Puzzle needs to be solved!
« Reply #11 on: July 24, 2003, 12:05:41 AM »
mdwh2 is right here, the rest of you need to go back to school  ;-)
Too much caffeine????
There\\\'s no such thing!!!!!!!  :pint:
 

Offline Wain

  • Hero Member
  • *****
  • Join Date: Sep 2002
  • Posts: 745
    • Show only replies by Wain
Re: Mathmatic genies click here --> a Puzzle needs to be solved!
« Reply #12 on: July 24, 2003, 06:34:19 AM »
@mdwh2

You are most right, I have lost my mind somwhere, prolly' left it in the wrong pants.

Distance to traverse is only going to be dragonwidth + screenwidth.  

Overall width of the field would be dragonwidth*2+screenwidth,

so, distance to move would have to be dragonwidth + screenwidth / Num_of_frames or pixels depending on what you're trying to accomplish.

\thanks for that mdwh2, I wasn't thinking clearly at the time.


Professional Expatriate