Flashadvisor logo
:: Desktop Shortcut
:: Flash Help
Advices from Experts

 Submit Here! · Link to Us · Newsletter · Tell a Friend ·

      Add Tutorial |

 

Advertise here








 

Google

Search WWW   
FlashAdvisor.com

 Home > Tutorials  > 3D

How To Create the 3D Object in Flash

Author: Sergey Kamenev | Email


Advertisement
In this lesson we shall use this method.
Let's place the flat object on the sphere. Changing the radius of sphere and the placement of object on it, we can cover all the points of space and all locations.
We shall begin from geometry.

Assume, that we want to place the square on the sphere. We pick the square because the calculations with it more easier than with other geometrical figure, and any flat geometrical figure can be covered by squares.
.









Co-ordinates in space (Xv, Yv, Zv) is drawen so,
that axis Xv points to us.
Co-ordinates on plane (X, Y) is picked so, that axis X coincides with axis Xv, and Y - with axis Zv.
Let's name co-ordinates of the point M in space (xv, yv, zv),
and co-ordinates of it on plane (x, y). Then:



x = xv(1)
y = yv

Assume, we want to place the yellow square with size 1*1 by the sphere with the centre in the
point (0, 0, 0) and radius R, this square looks as parallelogram on the picture.
Let's create the rules of portrayal of the square in space:
upper and lower sides are horizontal (despite of it contradicts to perspective rules)
(if it does not spinning around its own centre), and left and right sides will be tilted by the rule,
that we shall create now. The algorithm is simple: we shall change
horizontal and vertical the sizes of our square, rotate it,
press it from up to down and turn back.

Let's figure out what the degree of squeezing the horizontal and vertical the sizes of the square.


Pic.2


Pic.3



From pic.2:


l = cos α,

because the size of the square side equals to 1, and α we can find next way:





x
cos α = ------,
Rxy

where:



            
Rxy = x2 + y2

From pic.3:


h = cos β,





x
cos β = ------,
Rxz

where:



            
Rxz = x2 + z2



| 1 | 2 | 3 | 4 |

Rate This Tutorial :
We hope the information helped you. If you have any questions or comments, please don't hesitate to post them on the Forums section
Submit your Tutorial at Click Here
  

Home | About Us | Contact Us | Feedback | Advertise with us

Best viewed in 800x600 resolution with Internet Explorer.

Site Developed and Hosted by  ethicsolutions.com
All rights reserved with FlashAdvisor

Flash is a registered trademark of Adobe Systems, Inc.

1 user online