Advertisement
Guest User

Untitled

a guest
Nov 19th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. static float a = 0, da = 0.01;
  2. matrix3D_t tilting = rotationXMTX(0.5) * rotationYMTX(a);
  3.  
  4. point3D_t bg1[4] = {
  5. {0,0,0}, {100,0,0}, {100,100,0},{0,100,0}
  6. };
  7. point2D_t pbg1[4];
  8. vector3D_t vec;
  9. for(int i = 0 ; i < 4 ; i++) {
  10. vec = Point2Vector(bg1[i]);
  11. vec = tilting * vec;
  12. pbg1[i] = Vector2Point2D(vec);
  13. }
  14. drawPolygon(pbg1,4);
  15. a+=da;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement