ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
triangle_functions.hpp File Reference
#include "utils/Vector.hpp"
#include <algorithm>
#include <cmath>
#include <numbers>
+ Include dependency graph for triangle_functions.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  Utils
 

Functions

Vector3d Utils::get_n_triangle (const Vector3d &P1, const Vector3d &P2, const Vector3d &P3)
 Computes the normal vector of a triangle.
 
double Utils::area_triangle (const Vector3d &P1, const Vector3d &P2, const Vector3d &P3)
 Computes the area of triangle between vectors P1,P2,P3, by computing the cross product P1P2 x P1P3 and taking the half of its norm.
 
double Utils::angle_btw_triangles (const Vector3d &P1, const Vector3d &P2, const Vector3d &P3, const Vector3d &P4)
 Computes the angle between two triangles in 3D space.