[3d Notes-1] basic Geometry---personal understanding note __n2

Source: Internet
Author: User

Personal commentary on the 3x4 (actual 4x4) matrix:
The matrix is as follows:
N11 n12 N13 N14
N21 N22 n23 N24
N31 N32 N33 N34
U v W J
where U v W j is the one I added, specifically similar to the AS3 in the 2d matrix finally to line, can actually ignore

A function array that produces a translation rotation tilt or cut:
N11 N12 N13
N21 N22 n23
N31 N32 N33

Coordinate whole column
N14
N24
N34

It is generally possible to define 3x4 as a 4x4 homogeneous array, as defined by default, as follows
N11 n12 N13 N14
N21 N22 n23 N24
N31 N32 N33 N34
0 0 0 1

Array performance when translating:
1 0 0 N14
0 1 0 N24
0 0 1 N34
0 0 0 1
You can see that when the diagonal is 1 and the first three rows have only a value, the translation motion

Array performance when zooming:
S1 0 0 0
0 S2 0 0
0 0 S3 0
0 0 0 1
S1 corresponds to the x-axis scaling
S2 corresponding to the y-axis direction of scaling
S3 corresponding to the z-axis direction of scaling
A scale method commonly used to transform matrix matrices with reference to AS3 is similar

Array for rotation see continue next reply

About rotation

Statement:

Rad is the angle that will rotate

var c:number = Math.Cos (RAD);
That is, the cosine value
var s:number = Math.sin (RAD);
That is, the sine value

Rotate the entire column state around the x axis
1 0 0 0
0 C-s 0
0 S C 0
0 0 0 1

Rotate the entire column state around the y axis
C 0 S 0
0 1 0 0
-S 0 C 0
0 0 0 1

Rotate the entire column state around the z-axis
 c  -s  0   0
 s   c   0   0
 0   0   1   0
 0   0   0   1
 
  Because there are 3 axes
  can be divided into
 rotationx
 rotationy
 rotationz
 
  It is noteworthy that this matrix X Y z transformation does not need to consider the y-axis direction
  when converting to flash x y, you need to define the direction of Y or consider the direction of Y
  because in the stage y is down
 
  The other thing to consider is that we are now generally using the (0,0) method on the left, which also needs to be customized
  or to consider whether or not we want them to be the center of our mathematical Environment (0,0); but it's not that important at this point.
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.