blob: 6f0d373be249616fb13a66a0b9fb3e6a42891144 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
clear
//
//variable declaration
P1=20.0
P2=30.0
P3=20.0
theta3=60.0*%pi/180.0
//Taking horizontal direction towards left as x axis and the vertical downward direction as y axis.
////sum of vertical Fy & sum of horizontal forces Fx is zero
//Assume direction of Fx is right
//Assume direction of Fy is up
Fx=20.0*cos(theta3)
Fy=P1+P2+P3*sin(theta3)
R=sqrt((Fx**2)+(Fy**2))
printf("\n R= %0.4f KN",R)
alpha=atan(Fy/Fx)*180/%pi
printf("\n alpha= %0.2f °",alpha)
//moment at A
MA=P1*1.5+P2*3.0+P3*sin(theta3)*6.0
//The distance of the resultant from point O is given by:
d=MA/R
x=d/sin(alpha*%pi/180)
printf("\n x= %0.3f m",x)
|