Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (k * cos(theta) * a.x + k * -sin(theta) * a.y + (k * cos(theta) * v.x + k * -sin(theta) * v.y)) = c.x
- (k * cos(theta) * b.x + k * -sin(theta) * b.y + (k * cos(theta) * v.x + k * -sin(theta) * v.y)) = d.x
- (k * sin(theta) * a.x + k * cos(theta) * a.y + (k * sin(theta) * v.x + k * cos(theta) * v.y)) = c.y
- (k * sin(theta) * b.x + k * cos(theta) * b.y + (k * sin(theta) * v.x + k * cos(theta) * v.y)) = d.y
- //divide by k
- cos(theta) * a.x + -sin(theta) * a.y + cos(theta) * v.x + -sin(theta) * v.y = c.x / k
- cos(theta) * b.x + -sin(theta) * b.y + cos(theta) * v.x + -sin(theta) * v.y = d.x / k
- sin(theta) * a.x + cos(theta) * a.y + sin(theta) * v.x + cos(theta) * v.y = c.y / k
- sin(theta) * b.x + cos(theta) * b.y + sin(theta) * v.x + cos(theta) * v.y = d.y / k
- //use C and S for cos and sin
- C * a.x + -S * a.y + C * v.x + -S * v.y = c.x / k
- C * b.x + -S * b.y + C * v.x + -S * v.y = d.x / k
- S * a.x + C * a.y + S * v.x + C * v.y = c.y / k
- S * b.x + C * b.y + S * v.x + C * v.y = d.y / k
- //rearrange
- C * a.x + C * v.x + -S * v.y + -S * a.y = c.x / k
- C * b.x + C * v.x + -S * v.y + -S * b.y = d.x / k
- S * a.x + S * v.x + C * v.y + C * a.y = c.y / k
- S * b.x + S * v.x + C * v.y + C * b.y = d.y / k
- //factor
- C * (a.x + v.x) + -S * (v.y + a.y) = c.x / k
- C * (b.x + v.x) + -S * (v.y + b.y) = d.x / k
- S * (a.x + v.x) + C * (v.y + a.y) = c.y / k
- S * (b.x + v.x) + C * (v.y + b.y) = d.y / k
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement