On 3/4/22 10:19, Chris R wrote:
> Sorry, I should have been clearer in labeling the variables. For any given
> object, Radius and Height are fixed values, while x, y, and z vary over the
> isosurface boundaries. So, pow(y/Height,2) and sqrt(y/Height) both range
> between 0 at y=0 and 1 at y=Height.
Adding to what others have said.
Especially with contained by box, I'd recommend not putting container
sides on any x,y or z plane at 0.0. There is often a small amount of
noise in the ray-container intersection result. This means you might
well be getting small negative values internally though you specified a
0.0 container side value. Any negative 'y' values are a problem for the
sqrt() function for example.
I usually try and center my final 'shape' about 0,0,0 such that the
container ends up also centered at 0,0,0. You can also handle the
potential for near zero negative values other ways - ie abs(y).
Post a reply to this message