triangleArea

pyvsim.Utils.triangleArea(p1, p2, p3)[source]

Given three points in 3D space, returns the triangle area.

Assumes:

  1. points are given as numpy arrays (crashes if not met)
  2. if points lists are given, this will still work
Parameters :

p1, p2, p3 : numpy.array

If a list of points is given, they must be vertically stacked.

Returns :

area : scalar / numpy.array

The area of the points defined by the triangles. If lists of points were used as inputs, the output is a 1D numpy.array with as many elements as given points

This Page