[Bf-python] High level Mathutils additions

klopes at unizar.es klopes at unizar.es
Tue Dec 21 09:13:37 CET 2004


Hello again, great to be back. Lets go there:

Mensaje citado por Campbell J Barton <cbarton at metavr.com>:

> Hi, there are a number of math functions I find myself using a but, that 
> Id like to add into mathutils
> Mathutils.TriArea(vec1, vec2, vec3)
> - This would operate on 2d or 3d Vectors.

I can't see that: an area is defined by 2 vectors (a triangle), the third is
redundant, isn't it? 

> Mathutils.TriNormal(vec1, vec2, vec3)
> - Return a unit length normal vector from 3 vectors - 3d only.

I understand you want to calculate the normal vector to a vertex, that is, the
average/sum of the normalized of them? Or maybe the ortogonal to a face (i.e.,
vect product) ?

> Mathutils.LineIntersect(vecA, vecB, vecX, vecY)
> - works on a 2d or 3d vector, returns the intersection point or None if 
> the line does not intersect.
> 
> Make it possible to multiple a 3d vector by a 4x4 matrix, at the moment 
> you need to resize the vector to 4d and then do it-

GREAT!

Regards, Klópes



More information about the Bf-python mailing list