Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: FLASH: Basic calculations for a 3D-thing in Flash
From: Timm Kekeritz
Date: Thu, 7 Dec 2000 10:39:31 GMT

Hi Martin

You want to know the secret?
here it is:

The 3D thing is based on these formulas:

Here the calculation for "3D to 2D" transformation:
y= distance object -> screen
d= distance screen -> viewer
"screen_y" = ../:d* z_new/y
"screen_x" = ../:d* x_new/y

Turn around the z-abscissa:
"x_new" = (../:cos_yaw * x_old) - (../:sin_yaw * y_old)
"y_new" = (../:sin_yaw * x_old) + (../:cos_yaw * y_old)
"z_new" = z_old

Turn around the y-abscissa:
"x_new" = (../:cos_roll * x_old) - (../:sin_roll * z_old)
"y_new" = y_old
"z_new" = (../:sin_roll * x_old) + (../:cos_roll * z_old)


Turn around the x-abscissa:
"x_new" = x_old
"y_new" = (../:cos_pitch * y_old) - (../:sin_pitch * z_old)
"z_new" = (../:sin_pitch * y_old) + (../:cos_pitch * z_old)

That's all you need to know...
I won't publish the .fla-file, 'cause it shouldn't be too easy for the developers
out there!
With the .fla-file, there wouldn't be any didactic effect...
But if you have a question, ask me!

greetings from germany

yours timm

DRMRLPLSataol [dot] com wrote:

> Timm,
>
> So are you going to reveal the secret or the source or keep it locked up?
>
> Andrew
>
> >>In a message dated 12/1/00 4:22:12 PM Eastern Standard Time,
> >>Timm [dot] KekeritzatIconMedialab [dot] com writes:
> >>
> >><< Hey ho flash freaks out there...
> >>
> >> I've build a quite simple but kewl flash 3D-editor... it's possible to
> >>set
> >>the
> >> amount of points, the starting position of these points and the rotation
> >>speed
> >> and direction...
> >>
> >> check it out, and tell what you think about it!
> >>
> >> http://www.sucello.de
> >>
> >> greetings
> >>
> >> timm


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and the Flash(tm) Film Festival
November 27-29, 2000, LONDON, National Film Theatre

Produced by United Digital Artists and lynda.com
-Sponsored by Macromedia, Adobe Systems and Apple Computer
-http://www.flashforward2000.com or UK tel. +44 (0870) 751 1526
Register before November 10 and save �200
http:// www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]