ScratchData LogoScratchData
Back to sticku's profile

Matrix rotation (and scale)

STsticku•Created August 24, 2015
Matrix rotation (and scale)
132
101
2080 views
View on Scratch

Instructions

q,a - scale x w,s - scale y e,d - scale z arrows - rotate

Description

For advanced: see inside :P I always was scared of rotation matrixes, so I invented "own" rotation method. Some time ago I had to read about them, and found out that my method is almost identical... I think I'm genius. Rotation is represented by three vectors X Y and Z (matrix 3x3). At the beginning, they are unit vectors parallel to the coordinate axes. [(1,0,0),(0,1,0),(0,0,1)] ( Identity matrix ) The point is to rotate only these vectors and during rendering multiply vertices by these vectors. new_vertex=vertex.x*VectorX + vertex.y*VectorY + vertex.z*VectorZ. I hope that my English is not so bad. :P

Project Details

Project ID74012890
CreatedAugust 24, 2015
Last ModifiedAugust 24, 2015
SharedAugust 24, 2015
Visibilityvisible
CommentsAllowed