|
|
The function that calculates the cells pattern is as follows:
static DBL cells_pattern (VECTOR EPoint)
{
int temp;
DBL tf;
temp = POV_GET_OLD_RAND(); /* save current seed */
/* select a random value based on the cube from which this came. */
/* floor the values, instead of just truncating - this eliminates
duplicated cells
around the axes */
POV_SRAND(Hash3d((int)floor(EPoint[X]+Small_Tolerance),
(int)floor(EPoint[Y]+Small_Tolerance),
(int)floor(EPoint[Z]+Small_Tolerance)));
tf = FRAND();
POV_SRAND(temp); /* restore */
return min(tf, 1.0);
}
Why is Small_Tolerance being added to EPoint? That just offsets the pattern
by a little bit. What's the point?
- Slime
[ http://www.slimeland.com/ ]
Post a reply to this message
|
|