% Problem 14.10 % Set up problem digits 3 degrees on frames n % n1> to the right, n2> upward, and n3> = n1> x n2> points o,a,b % o is midpoint of pin, a is cable attachment point on beam % b is cable attachment point in room constants l{7},g,k bodies c mass c=m variables q % Rotation matrices simprot(n,c,-3,q) % Position vectors p_o_co>=(l1/2-l7)*c1>+(l3/2-l6)*c2> p_o_a>=(l1-l7)*c1>+(l3-l6)*c2>-l2/2*c3> p_o_b>=(l1-l7)*n1>+(l5-l6)*n2>-(l2/2+l4)*n3> p_a_b>=p_o_b>-p_o_a> u_a_b>=unitvec(p_a_b>) % Forces force_co>=-m*g*n2> l0=(l4^2+(l5-l3)^2)^0.5 force_a>=k*(mag(p_a_b>)-l0)*u_a_b> % Moment about point O m_o>=cross(p_o_co>,force_co>)+cross(p_o_a>,force_a>) zero[1]=dot(m_o>,n3>) stretch=mag(p_a_b>)-l0 evaluate(zero[1],q=4.417504472246025,l1=1.5,l2=0.15,l3=0.5,l4=1.0,l5=2.5,l6=0.15,l7=0.2,m=200,k=10000,g=9.8) evaluate(stretch,q=4.417504472246025,l1=1.5,l2=0.15,l3=0.5,l4=1.0,l5=2.5,l6=0.15,l7=0.2,m=200,k=10000,g=9.8) pause % Output nonlinear equation solver input l1=1.5,l2=0.15,l3=0.5,l4=1.0,l5=2.5,l6=0.15,l7=0.2,m=200,k=10000,g=9.8 units g=n/kg,k=n/m,m=kg,[l{1:7}]=m,q=deg output stretch code nonlinear(zero,q) prob14p10.m