summaryrefslogtreecommitdiff
path: root/3862/CH4/EX4.8
diff options
context:
space:
mode:
Diffstat (limited to '3862/CH4/EX4.8')
-rw-r--r--3862/CH4/EX4.8/Ex4_8.sce30
1 files changed, 30 insertions, 0 deletions
diff --git a/3862/CH4/EX4.8/Ex4_8.sce b/3862/CH4/EX4.8/Ex4_8.sce
new file mode 100644
index 000000000..2d226987d
--- /dev/null
+++ b/3862/CH4/EX4.8/Ex4_8.sce
@@ -0,0 +1,30 @@
+clear
+// The composite section is divided into three simple figures, a triangle, a rectangle and a semicircle
+
+//
+//variable declaration
+
+A1=1.0*3.0*4.0/2.0 //Area of 1,m^2
+A2=6.0*4.0 //Area of 2,m^2
+A3=1.0*%pi*(2**2)/2 //Area of 3**m^2
+
+//The coordinates of centroids of these three simple figures are:
+
+X1=6.0+3.0/3.0
+X2=3.0
+X3=-(4*2)/(3.0*%pi)
+
+Y1=4.0/3.0
+Y2=2.0
+Y3=2.0
+
+A=A1+A2+A3
+
+xc=(A1*X1+A2*X2+A3*X3)/A
+
+printf("\n xc= %0.4f m",xc)
+
+
+yc=(A1*Y1+A2*Y2+A3*Y3)/A
+
+printf("\n yc= %0.3f m",yc)