POV-Ray : Newsgroups : povray.binaries.images : Re: IsoStones : Re: IsoStones Server Time
5 Nov 2024 10:19:47 EST (-0500)
  Re: IsoStones  
From: PM 2Ring
Date: 14 Sep 2005 13:10:01
Message: <web.4328555a8195286505e02d50@news.povray.org>
"Mike Williams" <nos### [at] econymdemoncouk> wrote:

> >> > This group of stones is a single isosurface.

> >> > Now I just need to figure out how to perturb the stones' positions
> a bit. Any hints on this, anyone? Calling Mike Williams...

Thanks, for responding to the call, Mike!

> The problem is that I can't perturb the stones very far without then hitting
> the edges of the cells.

Exactly; and the cells themselves mustn't overlap. I've been thinking about
using cells with curved borders, but I can't think how to do them yet...
some kind of non-linear transform... My brain wants to turn itself inside
out, thinking about these nested isosurface functions. :)

> I switched off the shape variation and reduced the size of the stones and
> pushed the position variation as large as it would go without any stones
> going over the edge of their cells, and there's still not a lot of freedom
> of movement.

That's what I've been doing, too. I don't like what happens when
the stones overlap. It looks like they've melted into each other. :(

> The method I used was to use a cell pigment function
>     #declare PF = function{pigment{cells scale 2*W}}
> to apply a translation to each stone, a different translation in each cell
>   function {
>     f_r(f_modnoise(x+(PF(x,0,z).red-0.5)*P), y/H,
> f_modnoise(-z+(PF(x,0,z).red-0.5)*P))
>     - R
>   }

Ok, but I think that's pretty similar to what I do with

#declare f_cnoise = function(x,z)
{(W-R)*f_snoise3d(floor(x*.5/W), 0, floor(z*.5/W))}

This bit is essentially a cells function:

 f_snoise3d(floor(x*.5/W), 0, floor(z*.5/W))

except I'm hoping that it's more efficient than using a pigment function.

What I've been playing with earlier this evening is to shrink the stones &
overlap a pair of the isosurfaces in a checker pattern, so as to fill in
each other's gaps. The grid pattern is more acceptable, and the collisions
don't look so bad. You don't get that 'melted' problem I mentioned above,
since the stones aren't 'invading' each other's cells and so they don't
affect each others shape or texture.

I'll definitely have to think about your function when I wake up, Mike.
It's just after 3AM in my timezone. Good thing I've got tomorrow off work
:).


Post a reply to this message

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