CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Calculate internal angles of an Trilinear interpolation Cube (https://www.cfd-online.com/Forums/main/93217-calculate-internal-angles-trilinear-interpolation-cube.html)

 zampa October 8, 2011 10:09

Calculate internal angles of an Trilinear interpolation Cube

Does anybody know the (computational) fastest way to calculate the internal angles (minimal internal angle) of a cube, result of a trilinear interpolation between 8 points, in 3D space, of course.

 Rami October 11, 2011 10:09

Quote:
 Originally Posted by zampa (Post 327156) Does anybody know the (computational) fastest way to calculate the internal angles (minimal internal angle) of a cube, result of a trilinear interpolation between 8 points, in 3D space, of course.
Aren't all the cube internal angles 90 degrees?...
I guess you meant a hexa rather than a cube.
A straightforward way is computing angles from scalar product of vectors. Doing this for all the combinations you need, you can find the minimum angle.
Not sure this is the fastest way, and whether it is what you were asking.

 zampa October 11, 2011 11:18

Ok. Yes, itīs a hexa, resulting from a trilinear interpolation between 8 vertices.

And yes, actually I use the common way calculating each vector and the angles between them.

I could save time, by allocating a Matrix with all vectors. So I only compute each vector one time.

But does anyone know of a method, for example taking some diagonal, in order to save computacional cost?

 All times are GMT -4. The time now is 02:47.