[Bf-committers] Mesh-Tools in 2.36?

Martin Poirier theeth at yahoo.com
Tue Nov 30 22:53:32 CET 2004


--- joeedh <joeeagar at prodigy.net> wrote:

> Zach Morgan wrote:
> 
> >Hi Ton.
> >I have been working on the bridge tool slowly and
> >infrequently, but the patch has been updated a few
> >times.  
> >http://www.uncg.edu/~zpmorgan/bridge.patch
> >Bridge can now be called from the extrude menu.  
> >
> >A few Q's:
> >why might CVS on cygwin take forever to do updates
> and
> >diffs?  I've got a fast computer with a T1
> connection,
> >but CVS almost always times out after half an hour.
> 
> >This is why the patch hasn't been updated recently.
> >
> >How do you find the angle between two vectors?  I
> >found a python function that does this, can you
> call
> >python functions from c?
> >  
> >
> I believe that that would be the arc cosine of the
> dot product of the 
> vectors.  So, I think that would be:
> 
> Angle = acos(v1[0] * v[0] + v1[1] * v2[1] + v1[2] +
> v2[2])
> 
> . . .where v1 and v2 are vectors.  This is of course
> in radians, so to 
> convert to degrees you would do this:
> 
> Degree = Angle * 180 / PI (I think).
> 
> Remember that the dot product of two normalized
> (where length=1) vectors 
> is equal to the cosine between them.

Meaning that you'd either have to normalise the vector
beforehand (Normalise function in arithb.c) or divide
by the product of both length after doing the dot
product (Inpf function from arithb.c)

Doing a function to do all that at once would be easy.
I'll wip one up when CVS thaws.

Martin


		
__________________________________ 
Do you Yahoo!? 
All your favorites on one personal page – Try My Yahoo!
http://my.yahoo.com 


More information about the Bf-committers mailing list