"Fossies" - the Fresh Open Source Software Archive

Member "brlcad-7.32.4/doc/notes/matrix.txt" (29 Jul 2021, 1064 Bytes) of package /linux/misc/brlcad-7.32.4.tar.bz2:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 SGI style: rowvec * matrix		GED style: matrix * colvec
    2 
    3 [0][0]	[0][1]	[0][2]	[0][3]		0	1	2	3
    4 [1][0]	[1][1]	[1][2]	[1][3]		4	5	6	7
    5 [2][0]	[2][1]	[2][2]	[2][3]		8	9	10	11
    6 [3][0]	[3][1]	[3][2]	[3][3]		12	13	14	15
    7 
    8 r1	r2	r3	.		r1	r4	r7	tx
    9 r4	r5	r6	.		r2	r5	r8	ty
   10 r7	r8	r9	.		r3	r6	r9	tz
   11 tx	ty	tz	1/s		.	.	.	1/s
   12 
   13 Rot +X					Rot +X
   14 1	0	0			1	0	0
   15 0	cos	sin			0	cos	-sin
   16 0	-sin	cos			0	sin	cos
   17 
   18 Rot +Y					Rot +Y
   19 cos	0	-sin			cos	0	sin
   20 0	1	0			0	1	0
   21 sin	0	cos			-sin	0	cos
   22 
   23 Rot +Z					Rot +Z
   24 cos	sin	0			cos	-sin	0
   25 -sin	cos	0			sin	cos	0
   26 0	0	1			0	0	1
   27 
   28 
   29 For Negative rotations, the signs of the sine terms change.
   30 The LIBRT mat_ae( m, az, el ) azimuth, elevation routine does
   31 a +Z (az) followed by a -Y (-el) rotation.  This results in
   32 a GED matrix of:
   33 
   34 	cosAcosE	-sinA		-cosAsinE
   35 	sinAcosE	cosA		-sinAsinE
   36 	sinE		0		cosE
   37 
   38 ------------------------
   39 SGI:
   40 multmatrix inserts here
   41 		    |
   42 		   \|/
   43 	rowvec * Newmatix * matrix  [World_Coords]
   44 
   45 i.e. it premultiplies the matrix stack.
   46 rot(); trans();  looks like:
   47 
   48 	rowvec * Trans * Rot  [World_Coords]
   49 
   50 -----------------------