|
![](/i/fill.gif) |
"Francesco" <nas### [at] gmail com> wrote:
> Calculating area triangle per triangle I can always suppose z=0 (translating and
> rotating axis) as triangles are 2D. So I think the formula posted by Penelope20k
> is good.
>
>
> Francesco
YES ! it is not only good but great. it is the shortest route from points to
area I have seen.
just I am not able to mentally make the leap to 3D without a lengthy conversion
to 3 side lengths. If I could, it might be the shortest route in 3D.
also note that 666... is common to all tetra and pyramid volumes?!?
; //e $tetrahedron_volume(383 156 0, 645 254 0, 465 289 0,400 200 200) =
893666.666667
; //e $pyramid_volume(276 308 0, 383 123 0, 666 324 0, 276 308 0, 400 300 200)
= 2462066.666667
I have finished the volume macros
#macro tetrahedron_volume(A,B,C,D)
#local result = abs(vdot(D-A,vcross(D-B,D-C))) / 6
result
#end
#macro pyramid_volume(A,B,C,D,E)
// perimeter order for 1st 4 points
#local result =
tetrahedron_volume(A,B,C,E) + tetrahedron_volume(A,C,D,E);
result
#end
Post a reply to this message
|
![](/i/fill.gif) |