POV-Ray : Newsgroups : povray.general : isosurface function conversion Server Time
2 Nov 2024 15:26:24 EDT (-0400)
  isosurface function conversion (Message 1 to 5 of 5)  
From: [GDS|Entropy]
Subject: isosurface function conversion
Date: 8 Feb 2009 05:46:16
Message: <498eb7f8$1@news.povray.org>
Greetings,

Going through my old files, I found an isosurface that I used to produce a 
very interesting shape in an old version of MegaPov I think, but using the 
functions.inc and f_noise3d I get literally nothing. I've tried installing 
old versions of pov and megapov, but I can't seem to locate the correct one, 
maybe someone will recognize the syntax and be able to convert the 
following:

#declare GridCubeOn = true;
#declare use_photons = false;

#if (GridCubeOn)
#declare Foo =
 function {(noise3d(8*x, 12*y, .01)*noise3d(12*x, .01, 8*z)*noise3d(.01, 
8*y, 12*z))/3}
#declare Foo1 =
      function {noise3d(8*x, 12*y, .01)/3*noise3d(12*x, 8*y, 
.01)/3*noise3d(8*y, 12*z, .01)/3}
#declare Foo2 =
 function {noise3d(8*x, 12*y, .01)/3*noise3d(12*x, 8*y, .01)/3*noise3d(8*y, 
12*z, .01)/3}

#declare GridCube =
 isosurface {
  function {
   Foo
   }
   threshold 0.0001
   scale 1.6
   bounded_by {
    box {
     -4, 4
     }
    }
    texture {
     pigment {color rgb 0}
    }
     #if (use_photons)
     photons {
      separation 0.02*phd
      #if(refl)
      reflection on
      #end
      ignore_photons
      }
      #end
     }

#declare GridCube1 =
 isosurface {
  function {
   Foo1
   }
   threshold 0.0001
   scale 1.6
   bounded_by {
    box {
     -4, 4
     }
    }
    texture {
     pigment {color rgb 0}
     }
     #if (use_photons)
     photons {
      separation 0.02*phd
      #if(refl)
      reflection on
      #end
      ignore_photons
      }
      #end
     }

#declare GridCube2 =
 isosurface {
  function {
   Foo2
   }
   threshold 0.0001
   scale 1.6
   bounded_by {
    box {
     -4, 4
     }
    }
    texture {
     pigment {color rgb 0}
    }
     #if (use_photons)
     photons {
      separation 0.02*phd
      #if(refl)
      reflection on
      #end
      ignore_photons
      }
      #end
      rotate 90*y
     }

object {
 GridCube
  scale 1000
  translate <0,0,5000>
  }

object {
 GridCube1
  scale 1000
  translate <2000,0,5000>
  }

object {
 GridCube2
  scale 1000
  translate <-2000,0,5000>
  }

#debug "\nFinished Parse Of GridCube:"
#end


Post a reply to this message

From: Alain
Subject: Re: isosurface function conversion
Date: 8 Feb 2009 17:34:26
Message: <498f5df2$1@news.povray.org>
[GDS|Entropy] nous illumina en ce 2009-02-08 05:46 -->
> Greetings,
> 
> Going through my old files, I found an isosurface that I used to produce a 
> very interesting shape in an old version of MegaPov I think, but using the 
> functions.inc and f_noise3d I get literally nothing. I've tried installing 
> old versions of pov and megapov, but I can't seem to locate the correct one, 
> maybe someone will recognize the syntax and be able to convert the 
> following:
> 
> #declare GridCubeOn = true;
> #declare use_photons = false;
> 
> #if (GridCubeOn)
> #declare Foo =
>  function {(noise3d(8*x, 12*y, .01)*noise3d(12*x, .01, 8*z)*noise3d(.01, 
> 8*y, 12*z))/3}
> #declare Foo1 =
>       function {noise3d(8*x, 12*y, .01)/3*noise3d(12*x, 8*y, 
> .01)/3*noise3d(8*y, 12*z, .01)/3}
> #declare Foo2 =
>  function {noise3d(8*x, 12*y, .01)/3*noise3d(12*x, 8*y, .01)/3*noise3d(8*y, 
> 12*z, .01)/3}
> 
> #declare GridCube =
>  isosurface {
>   function {
>    Foo
>    }
>    threshold 0.0001
>    scale 1.6
>    bounded_by {
>     box {
>      -4, 4
>      }
>     }
>     texture {
>      pigment {color rgb 0}
>     }
>      #if (use_photons)
>      photons {
>       separation 0.02*phd
>       #if(refl)
>       reflection on
>       #end
>       ignore_photons
>       }
>       #end
>      }
> 
> #declare GridCube1 =
>  isosurface {
>   function {
>    Foo1
>    }
>    threshold 0.0001
>    scale 1.6
>    bounded_by {
>     box {
>      -4, 4
>      }
>     }
>     texture {
>      pigment {color rgb 0}
>      }
>      #if (use_photons)
>      photons {
>       separation 0.02*phd
>       #if(refl)
>       reflection on
>       #end
>       ignore_photons
>       }
>       #end
>      }
> 
> #declare GridCube2 =
>  isosurface {
>   function {
>    Foo2
>    }
>    threshold 0.0001
>    scale 1.6
>    bounded_by {
>     box {
>      -4, 4
>      }
>     }
>     texture {
>      pigment {color rgb 0}
>     }
>      #if (use_photons)
>      photons {
>       separation 0.02*phd
>       #if(refl)
>       reflection on
>       #end
>       ignore_photons
>       }
>       #end
>       rotate 90*y
>      }
> 
> object {
>  GridCube
>   scale 1000
>   translate <0,0,5000>
>   }
> 
> object {
>  GridCube1
>   scale 1000
>   translate <2000,0,5000>
>   }
> 
> object {
>  GridCube2
>   scale 1000
>   translate <-2000,0,5000>
>   }
> 
> #debug "\nFinished Parse Of GridCube:"
> #end 
> 
> 
I can't help you for your function.

I can help with the pfotons part:
Remove the photons from the finish. Add a photons{} block to the object.

The photons block should be:
photons{target reflection on}

Just the abcence of a photons block prevent the shootong of photons toward the 
object.


You also need this in the global_settings:
#if(use_photons)photons{spacing 0.02*phd autostop 0}#end

The presence of a photons block in the light_source is optional only needed if 
you want to sidable all or some of the photons treatment from that light_source.

-- 
Alain
-------------------------------------------------
You know you've been raytracing too long when you can describe in perfect, 
legal, pov syntax, how to re-create everything in your computer room using 
primitives and csg operations.
fish-head


Post a reply to this message

From: [GDS|Entropy]
Subject: Re: isosurface function conversion
Date: 8 Feb 2009 19:13:53
Message: <498f7541$1@news.povray.org>
I appreciate the effort, but only the isosurfaces are troubling me. ;-)
I've replaced the noise3d with f_noise3d, played with values etc.., but 
alas, no joy.

I think it must be changes in implementation of noise3d...maybe........I 
don't know what I'm talking about. ;-p

All I know, is those isos used to work way back when I made the file.

*~*

Thanks,
ian

"Alain" <ele### [at] netscapenet> wrote in message 
news:498f5df2$1@news.povray.org...
> [GDS|Entropy] nous illumina en ce 2009-02-08 05:46 -->
>> Greetings,
>>
>> Going through my old files, I found an isosurface that I used to produce 
>> a very interesting shape in an old version of MegaPov I think, but using 
>> the functions.inc and f_noise3d I get literally nothing. I've tried 
>> installing old versions of pov and megapov, but I can't seem to locate 
>> the correct one, maybe someone will recognize the syntax and be able to 
>> convert the following:
>>
>> #declare GridCubeOn = true;
>> #declare use_photons = false;
>>
>> #if (GridCubeOn)
>> #declare Foo =
>>  function {(noise3d(8*x, 12*y, .01)*noise3d(12*x, .01, 8*z)*noise3d(.01, 
>> 8*y, 12*z))/3}
>> #declare Foo1 =
>>       function {noise3d(8*x, 12*y, .01)/3*noise3d(12*x, 8*y, 
>> .01)/3*noise3d(8*y, 12*z, .01)/3}
>> #declare Foo2 =
>>  function {noise3d(8*x, 12*y, .01)/3*noise3d(12*x, 8*y, 
>> .01)/3*noise3d(8*y, 12*z, .01)/3}
>>
>> #declare GridCube =
>>  isosurface {
>>   function {
>>    Foo
>>    }
>>    threshold 0.0001
>>    scale 1.6
>>    bounded_by {
>>     box {
>>      -4, 4
>>      }
>>     }
>>     texture {
>>      pigment {color rgb 0}
>>     }
>>      #if (use_photons)
>>      photons {
>>       separation 0.02*phd
>>       #if(refl)
>>       reflection on
>>       #end
>>       ignore_photons
>>       }
>>       #end
>>      }
>>
>> #declare GridCube1 =
>>  isosurface {
>>   function {
>>    Foo1
>>    }
>>    threshold 0.0001
>>    scale 1.6
>>    bounded_by {
>>     box {
>>      -4, 4
>>      }
>>     }
>>     texture {
>>      pigment {color rgb 0}
>>      }
>>      #if (use_photons)
>>      photons {
>>       separation 0.02*phd
>>       #if(refl)
>>       reflection on
>>       #end
>>       ignore_photons
>>       }
>>       #end
>>      }
>>
>> #declare GridCube2 =
>>  isosurface {
>>   function {
>>    Foo2
>>    }
>>    threshold 0.0001
>>    scale 1.6
>>    bounded_by {
>>     box {
>>      -4, 4
>>      }
>>     }
>>     texture {
>>      pigment {color rgb 0}
>>     }
>>      #if (use_photons)
>>      photons {
>>       separation 0.02*phd
>>       #if(refl)
>>       reflection on
>>       #end
>>       ignore_photons
>>       }
>>       #end
>>       rotate 90*y
>>      }
>>
>> object {
>>  GridCube
>>   scale 1000
>>   translate <0,0,5000>
>>   }
>>
>> object {
>>  GridCube1
>>   scale 1000
>>   translate <2000,0,5000>
>>   }
>>
>> object {
>>  GridCube2
>>   scale 1000
>>   translate <-2000,0,5000>
>>   }
>>
>> #debug "\nFinished Parse Of GridCube:"
>> #end
> I can't help you for your function.
>
> I can help with the pfotons part:
> Remove the photons from the finish. Add a photons{} block to the object.
>
> The photons block should be:
> photons{target reflection on}
>
> Just the abcence of a photons block prevent the shootong of photons toward 
> the object.
>
>
> You also need this in the global_settings:
> #if(use_photons)photons{spacing 0.02*phd autostop 0}#end
>
> The presence of a photons block in the light_source is optional only 
> needed if you want to sidable all or some of the photons treatment from 
> that light_source.
>
> -- 
> Alain
> -------------------------------------------------
> You know you've been raytracing too long when you can describe in perfect, 
> legal, pov syntax, how to re-create everything in your computer room using 
> primitives and csg operations.
> fish-head
>


Post a reply to this message

From: Mike Williams
Subject: Re: isosurface function conversion
Date: 9 Feb 2009 01:22:49
Message: <rlOsvXByt8jJFwhJ@econym.demon.co.uk>
Wasn't it [GDS|Entropy] who wrote:
>Greetings,
>
>Going through my old files, I found an isosurface that I used to produce a
>very interesting shape in an old version of MegaPov I think, but using the
>functions.inc and f_noise3d I get literally nothing. I've tried installing
>old versions of pov and megapov, but I can't seem to locate the correct one,
>maybe someone will recognize the syntax and be able to convert the
>following:

The problem is that that particular function relies on a feature of the
old noise generator which was later considered to be undesirable, and
got fixed. You can resurrect the old noise generator by using
global_settings {noise_generator 1} but even so the details of the
structure aren't identical to what you would have seen with MegaPov 0.3


global_settings {noise_generator 1}
#include "functions.inc"

#if (GridCubeOn)
#declare Foo =
 function {(f_noise3d(8*x, 12*y, .01)*f_noise3d(12*x, .01,
8*z)*f_noise3d(.01,8*y, 12*z))/3}
#declare Foo1 =
      function {f_noise3d(8*x, 12*y, .01)/3*f_noise3d(12*x,
8*y,.01)/3*f_noise3d(8*y, 12*z, .01)/3}
#declare Foo2 =
 function {f_noise3d(8*x, 12*y, .01)/3*f_noise3d(12*x,
8*y,.01)/3*f_noise3d(8*y, 12*z, .01)/3}

#declare GridCube =
 isosurface {
  function {
   Foo(x/1.6,y/1.6,z/1.6)
   }
   threshold 0.0001
   max_gradient 2
   contained_by {
    box {-4, 4}
    }
    texture {
     pigment {color rgb 1}
    }
 }


[I changed the pigment from rgb 0, because otherwise I get nothing but
black in both MegaPov 0.3 and PovRay 3.6]

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: [GDS|Entropy]
Subject: Re: isosurface function conversion
Date: 9 Feb 2009 13:30:44
Message: <49907654$1@news.povray.org>
Mike you are the man! :-D

That fixed it! And I appreciate the background on why it broke in the first 
place, its always good to understand the source of any particular problem.

Thats one more 10-11yo scene file resurrected!

ian

"Mike Williams" <nos### [at] econymdemoncouk> wrote in message 
news:rlO### [at] econymdemoncouk...
> Wasn't it [GDS|Entropy] who wrote:
>>Greetings,
>>
>>Going through my old files, I found an isosurface that I used to produce a
>>very interesting shape in an old version of MegaPov I think, but using the
>>functions.inc and f_noise3d I get literally nothing. I've tried installing
>>old versions of pov and megapov, but I can't seem to locate the correct 
>>one,
>>maybe someone will recognize the syntax and be able to convert the
>>following:
>
> The problem is that that particular function relies on a feature of the
> old noise generator which was later considered to be undesirable, and
> got fixed. You can resurrect the old noise generator by using
> global_settings {noise_generator 1} but even so the details of the
> structure aren't identical to what you would have seen with MegaPov 0.3
>
>
> global_settings {noise_generator 1}
> #include "functions.inc"
>
> #if (GridCubeOn)
> #declare Foo =
> function {(f_noise3d(8*x, 12*y, .01)*f_noise3d(12*x, .01,
> 8*z)*f_noise3d(.01,8*y, 12*z))/3}
> #declare Foo1 =
>      function {f_noise3d(8*x, 12*y, .01)/3*f_noise3d(12*x,
> 8*y,.01)/3*f_noise3d(8*y, 12*z, .01)/3}
> #declare Foo2 =
> function {f_noise3d(8*x, 12*y, .01)/3*f_noise3d(12*x,
> 8*y,.01)/3*f_noise3d(8*y, 12*z, .01)/3}
>
> #declare GridCube =
> isosurface {
>  function {
>   Foo(x/1.6,y/1.6,z/1.6)
>   }
>   threshold 0.0001
>   max_gradient 2
>   contained_by {
>    box {-4, 4}
>    }
>    texture {
>     pigment {color rgb 1}
>    }
> }
>
>
> [I changed the pigment from rgb 0, because otherwise I get nothing but
> black in both MegaPov 0.3 and PovRay 3.6]
>
> -- 
> Mike Williams
> Gentleman of Leisure
>


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.