A problem on COM

1m 1.1m 1.25m 1.5m 0.8m 1.08m 1.75m 0.75m

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Steven Chase
Oct 17, 2018

 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
35
36
37
38
import math

AC = 2.0
BC = 1.0
AB = math.sqrt(AC**2.0 - BC**2.0)

angBCA = math.atan(AB/BC)
angBAC = math.pi - math.pi/2.0 - angBCA

Ax = 0.0
Ay = 0.0

Bx = AB * math.cos(angBAC)
By = AB * math.sin(angBAC)

Cx = 2.0
Cy = 0.0

Dx = Bx
Dy = -By

Ex = (Ax + Bx) / 2.0
Ey = (Ay + By) / 2.0

Fx = (Bx + Cx) / 2.0
Fy = (By + Cy) / 2.0

Gx = Ex
Gy = -Ey

Hx = Fx
Hy = -Fy

COMx = (AB * Ex + AB * Gx + BC * Fx + BC * Hx + AC * AC/2.0) / (2.0*AB + 2.0*BC + AC)

print COMx

# Answer is 1.08493649054 

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...