POV-Ray : Newsgroups : povray.binaries.images : A doodle and ramblings on pattern{} and iso perturbation : Re: A doodle and ramblings on pattern{} and iso perturbation Server Time
7 Jun 2025 14:05:30 EDT (-0400)
  Re: A doodle and ramblings on pattern{} and iso perturbation  
From: Kenneth
Date: 5 Jun 2025 20:25:00
Message: <web.684233698b738c14e83955656e066e29@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:
>
> [Running v3.8 beta 1 in Windows]
>
> I simplified your 'FnTorusWarp' function to be just a basic torus, so that I
> could run it for experimenting.
>
> I am seeing some odd isosurface behavior when the torus function is
> turned into a pattern...

Hey, I think I solved these problems-- by using min (...). Although, I honestly
don't know *why* it works.

So far, all of my isosurface tests look OK, no 'extra parts' show up. And the
torus object can now be any size, with a larger contained_by object. (There is
still the thorny issue of POV-ray crashing now and then; in 15 of my latest test
renders, it crashed once. No idea why.)

The two arguments of min can be actually be swapped, for the same effect.

#declare FnTorusWarp = function {
     pattern {
         function {
             min(f_torus(x,y,z, 8.0,2.5),
             .95 // part of min-- this can actually be anything *between* 0 and
                 // 1.0, it seems. But not >= 1.0.
                ) // end of min
                            }
         scale 2
         warp{ turbulence .5, omega .001 }
         scale 1/2

         triangle_wave
     }
}


isosurface{
 function{FnTorusWarp(x,y,z)}
 threshold .01
 accuracy .001
 max_gradient 5
 contained_by{sphere{0,12}}
 }


Post a reply to this message

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