AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Triangle rotation in computer graphics3/13/2023 ![]() Rotation sin(a+b) = sin(a)cos(b) + sin(b)cos(a) cos(a+b) = cos(a)cos(b) - sin(a)sin(b) sin(a+b) = sin(a)cos(b) + sin(b)cos(a) cos(a+b) = cos(a)cos(b) - sin(a)sin(b) Similarly,Ī point (x, y) can be re-written in homogeneous coordinates as (xh, yh, h) The homogeneous parameter h is a non- zero value such that: We can then write any point (x, y) as (hx, hy, h) We can conveniently choose h = 1 so that (x, y) becomes (x, y, 1) Scaling Scalar multiplies all coordinates WATCH OUT: Objects grow and move! Note: House shifts position relative to origin y x 1 2 3 4 5 6 7 8 9 10 ![]() Translation Simply moves an object from one position to another Note: House shifts position relative to origin y x 1 2 3 4 5 6 7 8 9 10ĥ 2D Translation Moving a polygon from position (a) to position (b) with the translation vector (-5, 10), i.e. Reflection and Shearingģ Why transformations ? In graphics, once we have an object described, transformations are used to move that object, scale it and rotate it
0 Comments
Read More
Leave a Reply. |