Advertisement
Guest User

Untitled

a guest
May 13th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. (k * cos(theta) * a.x + k * -sin(theta) * a.y + (k * cos(theta) * v.x + k * -sin(theta) * v.y)) = c.x
  2. (k * cos(theta) * b.x + k * -sin(theta) * b.y + (k * cos(theta) * v.x + k * -sin(theta) * v.y)) = d.x
  3. (k * sin(theta) * a.x + k * cos(theta) * a.y + (k * sin(theta) * v.x + k * cos(theta) * v.y)) = c.y
  4. (k * sin(theta) * b.x + k * cos(theta) * b.y + (k * sin(theta) * v.x + k * cos(theta) * v.y)) = d.y
  5.  
  6. //divide by k
  7. cos(theta) * a.x + -sin(theta) * a.y + cos(theta) * v.x + -sin(theta) * v.y = c.x / k
  8. cos(theta) * b.x + -sin(theta) * b.y + cos(theta) * v.x + -sin(theta) * v.y = d.x / k
  9. sin(theta) * a.x + cos(theta) * a.y + sin(theta) * v.x + cos(theta) * v.y = c.y / k
  10. sin(theta) * b.x + cos(theta) * b.y + sin(theta) * v.x + cos(theta) * v.y = d.y / k
  11.  
  12. //use C and S for cos and sin
  13. C * a.x + -S * a.y + C * v.x + -S * v.y = c.x / k
  14. C * b.x + -S * b.y + C * v.x + -S * v.y = d.x / k
  15. S * a.x + C * a.y + S * v.x + C * v.y = c.y / k
  16. S * b.x + C * b.y + S * v.x + C * v.y = d.y / k
  17.  
  18. //rearrange
  19. C * a.x + C * v.x + -S * v.y + -S * a.y = c.x / k
  20. C * b.x + C * v.x + -S * v.y + -S * b.y = d.x / k
  21. S * a.x + S * v.x + C * v.y + C * a.y = c.y / k
  22. S * b.x + S * v.x + C * v.y + C * b.y = d.y / k
  23.  
  24. //factor
  25. C * (a.x + v.x) + -S * (v.y + a.y) = c.x / k
  26. C * (b.x + v.x) + -S * (v.y + b.y) = d.x / k
  27. S * (a.x + v.x) + C * (v.y + a.y) = c.y / k
  28. S * (b.x + v.x) + C * (v.y + b.y) = d.y / k
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement