How to use "isosurface" (Advanced)



This page describes how to use "isosurface".

Step 1. Eval option and Max_gradient [1]
Step 2. Eval option and Max_gradient [2]
Step 3. Accuracy



Step 1. Eval option and Max_gradient [1]

  The "isosurface" finding routine can find the first intersecting point between ray and isosurface of any continuous functions if the maximum gradient of the function is known. By default, however, POVRay assume the maximum gradient is 1.1. Thus, when real maximum gradient of the function is 1, e.g. f= P0-(x*x+y*y+z*z), it will work well. In the case that real maximum gradient is much lower than 1, POVRay can produce the shape properly but the rendering time will be long. If the maximum gradient is much higher than 1, POVRay cannot find intersecting points and you will see improper shape. In these cases, you should specify the maximum gradient value using 'max_gradient" keyword.
 If you do not know the max_gradient of the function, you can see the maximum gradient value in the final statistics screen if you add eval option. If the max_gradient value of final screen is greater than that of the POV file, you should change the max_gradient value.

Example: nfunc12.pov



Step 2. Eval option and Max_gradient [2]

  If you set 'eval' option without 'max_gradient' keyword, POVRay will try to estimate maximum gradient semi-automatically using results of neighboring pixels. However, this is not perfect method and sometimes you have to use fixed max_gradient or additional parameters for 'eval' option.
 Since the initial max_gradient estimation value is 1.1, estimation could work well when the real maximum gradient is around 1 (usually, from 0.5 to ~5). If the real maximum gradient is far from 1, the estimation will not work well. In this case, you should add optional three parameters to 'eval' option.
   eval <V1, V2, V3>   // where V1,V2,V3 are float values.
 The first parameter, V1, is the initial estimation value instead of 1. This means the minimum 'max_gradient' value in the estimation process is V1. The second parameter is over-estimation parameter (V2 should be 1 or greater than 1) and the third parameter is attenuation parameter (V3 should be 1 or less than 1). 
Default is <1.1, 1.2, 0.99>. 
If you see improper shape and want to change the default, you should change (increase) V1 at first.

Example: nfunc2.pov



Step 3. Accuracy

  As "isosurface" finding is a kind of iteration method, you can specify the accuracy of the intersecting point using "accuracy" keyword to optimize the rendering speed. The default "accuracy" value is 0.001. The higher value will give us faster rendering speed but lower quality. For example,

isosurface
{
 box <-1,-0.15,-1>, <1, 0.15, 1>
 function "torus", <0.85, 0.15>
 accuracy ACCURACY
}

Following pictures are rendered with the ACCURACY values of default (0.001), 0.02, 0.05, and 0.1 respectively.


return to POV3ISO home page