POV-Ray : Newsgroups : povray.advanced-users : Isosurface Rocks, using a single iso; could use a bit of help : Re: Isosurface Rocks, using a single iso; could use a bit of help Server Time
26 Apr 2024 21:16:53 EDT (-0400)
  Re: Isosurface Rocks, using a single iso; could use a bit of help  
From: [GDS|Entropy]
Date: 9 Dec 2016 12:10:01
Message: <web.584ae3f3916cc6b41c3f31c90@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "[GDS|Entropy]" <nomail@nomail> wrote:
>
> > Here is the code which uses the single iso but gives many rocks, what I am
> > trying to do is combine the Isosurface function from my bit that I adapted from
> > Tek with the single iso method below so I can use a single iso and get many
> > rocks but using my algorithm.
>
> I think I understand.
>
> Follow that code like this -
> the moduli (AFAIK) produce intermittent values, for lack of a better way to
> describe it - just the remainders.  Bread crumbs on the number line.
>
> > //    2D cells: returns a random value for each unit square
> for every square generate a random number,
>
> > //    Noisy modulus. Makes a random centre for each stone
> .... and then a random location,
>
> > //    Randomized radius for tumbled stone shape
> ... with a random size
>
> > //Displaced, vertically squashed spheres
>
> and then make spheres.
>
>
> >     function
> >     {
> >         f_Stone(x, y, z) - Radius * f_Rad(x, y, z)
> >     }
>
> so you take that first function, and subtract a varying value of f_rad from it
> to get the overall value where the isosurface function equals zero.
>
> To give a sort of 2D analogy, imagine making a heightfield and intersecting it's
> isolated peaks with a plane at y=0.   You'd get irregular shaped 'disks'
> scattered throughout the plane.
>
> This just does sort of the same thing but it's in 3D, where the function of x,
> y, and z equals zero, and the irregular shapes are in space, not a plane.
>
> I will have to think a bit about how to take your pigment pattern method and
> make it work as a single isosurface.
> I think you will have to add or subtract something like leopard or spotted, or
> just part of that original code function to get _your_ shape scattered
> throughout a single isosurface like the example code.
>
> Does that make sense?

I think I get it, the spotted or leopard makes sense for a method to produce
unique instances of another thing, using them as a sort of mask, if I have your
meaning.

Before the rabbit hole is too deeply traversed, will it be possible to have
variance in the function governing each rock? I want to maintain the rocks
having many functions.

Of course a workaround would be to simply call the resultant macro, passing in
whichever function is desired for volume governance, a number of times equal to
the number of rock function variants desired.

Of course I will need to run some sort of collision detection to prevent
overlaps.

Is it possible to use an array of blobs in a single blob object [elements not
necessarily touching] as the container shape for the iso?

This would simplify the whole collision thing since the iso would only appear
within those elements and I can run an algo to track the positions, and allocate
location vector subsets to each rock function through an external array passed
to each call to the macro for each function variant desired.

I guess IO am getting a little ahead of myself though; first the single iso will
need to be done, then assuming what I am thinking of with the blob container is
actually possible, the rest will be pretty simple for me to knock out.

Thanks for your time!
Ian


Post a reply to this message

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