Thursday, April 03, 2008

Vector Basics







Reflect I about N

I - 2*(I.N)*N















Project d onto the plane that N is normal to

d - (N.d) * N

Monday, March 10, 2008

help for shake scripters

This is so cool, I can't beleive I didn't know about it before

shake -help |& more

Previously I only knew that shake -help will output on stderr, not stdout so (under tcsh) I can pipe that to a file using >& (instead of > which pipes stdout to a file ) but then I have to open the file and read it, whereas all I want to do is | more

So the | pipe symbol works on stdout and |& is the same but stderr, which is where shake -help outputs to.

Wednesday, February 20, 2008

gnu plot tricks

in case anyone else needs to, the way to store a variable and use that instead of directly using equations is;

plot f(x) = cos(x/180.0*3.141592), f(x)**2 * (3.0 - (2.0 * f(x)) ), f(x)**2

where "f(x)" is the name of the 'variable'

Thursday, February 14, 2008

4 digit padding in mel (using python)

string $padframe = python( "'%04d' % " + $newFnum );

Friday, February 08, 2008

symbol table utility


nm -A -C dof.so | grep globalThreadCount

This is useful to track the source of an error message related to a mangled sym table name,
eg.
D02001 {WARNING} TgPathDLOpen: Bad DSO found: dof.so (undefined symbol: _ZN3Imf17globalThreadCountEv)


man nm

will give the manual page


ldd mydso.so

will list the dependencies a dso has. Which is also useful

Tuesday, January 29, 2008

Cross Product, Right Hand Rule


1stFinger x 2ndFinger = Result

The order in the equation has to match the spatial order in the picture. 1st Finger comes first when reading equation left to right.

Thursday, January 17, 2008

reducing errors

Put this in the rib. Sweet!

       ErrorHandler "printonce"