import math
from numpy import linalg
# Variables
W = 100. #lb
a1 = 30. #degrees
a2 = 45. #degrees
# Calculations
A =[[math.cos(math.radians(a2)),-math.cos(math.radians(a1))],[math.sin(math.radians(a2)),math.sin(math.radians(a1))]]
b =[[0],[W]]
c = linalg.solve(A,b)
Tbc = c[0]
Tab = c[1]
# Results
print 'Tbc = %.1f lb'%(Tbc)
print 'Tab =%.1f lb'%(Tab)
import math
# Variables
W1 = 7000. #lb
W2 = 1000. #lb
W3 = 3000. #lb
x1 = 6. #in
x2 = 9. #in
x3 = 10. #in
x4 = 5. #in
# Calculations
Rb = (W1*x1+W2*(x1+x2)+W3*(x1+x2+x3))/(x1+x2+x3+x4)
Ra = W1+W2+W3-Rb
# Results
print 'Rb = %.1f lb'%(Rb)
print 'Ra = %.1f lb'%(Ra)
import math
# Variables
Fc = 500. #lb
Fd = 1000. #lb
xc = 2. #in
xd = 8. #in
y = 6. #in
# Calculations
Ay = Fc+Fd
Bx = (Fc*xc+Fd*xd)/y
Ax = Bx
A = math.sqrt(Ax**2+Ay**2)
# Results
print 'A = %.f lb'%(A)
print 'B = %.f lb'%(Bx)
# Variables
W = -300. #lb
r = 4. #in
x1 = 2. #ft
x2 = 3. #ft
x3 = 1. #ft
y1 = 1. #ft
x4 = 3. #in
# Calculations
F = -W*r/(y1*12)
By = -W*x1/(x1+x2)
Bz = -F*(x1+x2+x3+(x4/12))/(x1+x2)
Ay = -W-By
Az = -F-Bz
# Results
print 'Ay = %.2f lb'%(Ay)
print 'By = %.2f lb'%(By)
print 'Az = %.2f lb'%(Az)
print 'Bz = %.2f lb'%(Bz)
print 'F = %.2f lb'%(F)
import math
# Variables
W = 500. #lb
r = 4. #in
Lx = 3. #in
Ly = 12. #in
Lz = 4. #in
# Calculations
Tbd = W*(math.sqrt((-Lx)**2+(-Ly)**2+(-Lz)**2))/Ly
Tcd = Lx*Tbd/(math.sqrt((-Lx)**2+(-Ly)**2+(-Lz)**2))
Tad = Lz*Tbd/(math.sqrt((-Lx)**2+(-Ly)**2+(-Lz)**2))
# Results
print 'Tbd = %.f lb'%(Tbd)
print 'Tcd =%.f lb'%(Tcd)
print 'Tad =%.f lb'%(Tad)