Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function [x,y] = xy_values2(t)
- % to find xy values for root 1: [x_r1, y_r1] = xy_values(root1)
- gamma = pi / 4;
- l1 = 3;
- l2 = 3*(sqrt(2));
- l3 = 3;
- p1 = 5;
- p2 = 4;
- p3 = 3;
- x1 = 5;
- x2 = 0;
- y2 = 6;
- a2 = (l3.*cos(t) - x1);
- b2 = (l3.*sin(t));
- a3 = (l2.*cos(t + gamma) - x2);
- b3 = (l2.*sin(t + gamma) - y2);
- d = (2 * (a2.*b3 - b2.*a3));
- n1 = (b3.*(p2.^2 - p1.^2 - a2.^2 - b2.^2) - b2.*(p3.^2 - p1.^2 - a3.^2 - b3.^2));
- n2 = (-1*a3.*(p2.^2 - p1.^2 - a2.^2 - b2.^2) + a2.*(p3.^2 - p1.^2 - a3.^2 - b3.^2));
- y = n2/d;
- x = n1/d;
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement