Measure the slope of a triangle relative to a plane

106 Views Asked by At

Suppose I have a list of vertices that form triangles floating in space. How do I measure the slope of each triangle relative to a flat ground plane?

1

There are 1 best solutions below

0
On

A point A has the coordinates (X1,Y1,Z1).A point B has the coordinates (X2,Y2,Z2)

The slope of an angle θ it's tgθ.

So, tgθ=|Y1-Y2|/d ,where d is the distance between the Y-axes of each point.

Using the Pythagorean theorem ,we find d=√[ (Z1-Z2)^2 + (X1-X2)^2 ]

So,the slope is tgθ=|Y1-Y2|/√[ (Z1-Z2)^2 + (X1-X2)^2 ] .

I hope I helped you.