|
|
|
How To Create the 3D Object in Flash
Author: Sergey Kamenev | Email
Advertisement
Now the last thing that we have to do. See pic.5.
Pic.5
 | |
The yellow parallelogram is the parallelogram that we want to have.
To make it from the square, we have to decrease horizontal and vertical sizes
of initial square to p and q correspondingly (we shall
| m |
| find them), rotate on φ, squeeze | ------ | times (φ, m and n we have to find, too) and rotate |
| n |
back on σ (it is marked on pic.5 by dotted arc, we shall determine it, too).
Let's calculate p and q. From similarity of the triangles ACD and CDK ([DK] is perpendicular dropped from the point named by D on the diagonal d):
where g is the length of the segment [KC]. Hence:
and g we can find from the triangle ACD1:
Here is:
| d2 = l2 + w2 - 2 l w cos γ, |
where d is the biggest diagonal of the parallelogram, l and w are lengths of its sides,
and cos γ is the angle between w and l. Let's calculate smaller diagonal f of the parallelogram:
| f2 = l2 + w2 - 2 l w cos (180° - γ) = l2 + w2 + 2 l w cos γ, |
and here is from the triangle-quater of the parallelogram:
| a2 | | d2 |
| ------ | = | ------ | + w2 - d w cos τ, |
| 4 | | 4 |
and here is from this:
| |
| d2 | | w2 |
| ------ | + w2 - | ------ |
| 4 | | 4 |
|
| cos τ = | ---------------------------. |
| | d w |
So, τ we already have found. Let's find the angle named by φ:
The coefficient of squeezing δ is:
The "back" rotation angle is:
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
|
|