import geometry; size(5cm,0); settings.tex="pdflatex"; settings.outformat="pdf"; real M1 = 5; real M2 = 3; real M3 = 2; real L12 = 2; real L13 = 3; real Alpha1 = pi/7.05086; real Alpha2 = pi/4; point Q1 = (-1, 0); point Q2 = Q1 + L12*(cos(Alpha1), sin(Alpha1)); point Q3 = Q1 + L13*(cos(Alpha2), -sin(Alpha2)); mass M1 = mass(Q1, M1); mass M2 = mass(Q2, M2); mass M3 = mass(Q3, M3); triangle Q123 = triangle(Q1, Q2, Q3); draw(Q123, grey); draw(Q2--Q3, dashed+red); dot(relpoint(Q2--Q3, 0.5), lightred); mass MC = masscenter(M1,M2,M3); dot("$C$", point(MC), NE, blue); line Q1C = line(Q1, MC); draw(Label("$x$", Relative(1.0), align=S), Q1C, blue, Arrow(HookHead)); line Y = perpendicular(MC, Q1C); draw(Label("$y$", Relative(0.0), align=W), Y, blue, BeginArrow(HookHead)); draw(Q1--Q2); draw(Q1--Q3); draw(Q2--Q3, dashed+red); dot(relpoint(Q2--Q3, 0.5), lightred); dot(Q1, red); label("$q_1$", M1, SW, red); dot(Q2, red); label("$q_2$", M2, N, red); dot(Q3, red); label("$q_3$", M3, S, red);