+5  A: 

Your types are wrong, you can't pass a pointer to an array of pointers to a function expecting an array of arrays (i.e. a pointer to an array).

For the signature of get_translation that you have, you need:

double (*trans)[3] = malloc(cell->size * sizeof(double[3]));
Charles Bailey
From a memory-management standpoint, this does make sense to me, and it works when I make the change -- Thanks! However, I'm have some trouble wrapping my head around the syntax in the declaration, and googling hasn't turned up much info on this. Can you recommend a reference on this technique? Thanks again!
dlonie
@dlonie: A couple of recent questions on this subject are: http://stackoverflow.com/questions/3707096/ and http://stackoverflow.com/questions/3706704/ .
Charles Bailey
Ah, I see now. I was thrown off by seeing a pointer dereferenced in it's declaration -- rather unintuitive based on my c++ experience! The tip about the spiral rule helped clear this up.
dlonie
A: 

SO here is perhaps one problem. Your function seems to assume (based on) trans[num_trans][j] = someDouble; that trans is in fact an array laid out sequentially which as I mentioned above is not true in this case. You are allocating an array of pointers rather than a 2 dimensional array. Something similar to

double* trans = malloc(cell->size * 3); might be better. In general you might want to use a 1d array instead of a 2d one and just use it as 2 dimensional array.

Aurojit Panda