English

FAQ: Can I calculate the approximate average slope of a (non-planar) shape?

Question

Can I calculate the approximate average slope of a (non-planar) shape?

Answer

Yes, by using the following example. Please note that this is CGA sample code and may not apply in all situations.

Note:
CGA stands for Computer Generated Architecture, a scripting language specific to Esri CityEngine and used to generate 3D content. See the link to the 'Basics of Rule-based Modeling' in the Related Information section below.


Code:
slopeFunction = atan ( sqrt ( scope.sy / scope.sz) )

Lot -->
alignScopeToAxes(y)
print ( slopeFunction )


Related Information