Rob
Forum Moderator

One comment (other than to echo reading the books) is that you've written a 3d UDF - have a look at what the vel[3] bit means, I think you'll find vel[2] to be sufficient and remember C counts from 0 not 1.Â