Commit Graph

2 Commits

Author SHA1 Message Date
Bill Currie 3193ffd9cc Better (-1..1) random numbers.
Now the distribution should be more even as the rng doesn't affect the
exponent.
2013-03-13 14:41:04 +09:00
Bill Currie 0cd6d93030 Add a function to get the barycentric coords of a point.
It "works" for lines, triangles and tetrahedrons. For lines and triangles,
it gives the barycentric coordinates of the perpendicular projection of the
point onto to features. Only tetrahedrons are guaranteed to reproduce the
original point.
2013-03-12 14:16:42 +09:00