|
|
"Josh" <nomail@nomail> wrote:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
> > "Josh" <nomail@nomail> wrote:
> >
> > > > A starting point :
> > > > function { Fnct01(x+sin(y*2+z*3),y-cos(x*7),z+cos(y*5)) }
> >
> > I honestly can't even begin to imagine what inspired _that_.
> >
> > > That produced interesting results. It split the shape up and duplicated it a
> > > bunch of times. I'll have to think about it.
> >
> > You and me both :O
> >
> > > In the meantime, does anyone know what the isosurface function would be for a
> > > rounded box?
> >
> > As a matter of fact, I do! :)
> >
> > #declare R = 20;
> > #declare RoundedBox = function {pow(x,R) + pow(y,R) + pow(z,R) - 1} // rounded
> > cube
> >
> > I haven't tried making all of the R's different ... yet ;)
> >
> > Hope it's going well, and you're making progress.
>
> Well, it's interesting. I was hoping that the rounded box would be in the form
> of:
> float sdRoundBox( vec3 p, vec3 b, float r )
> {
> vec3 q = abs(p) - b;
> return length(max(q,0.0)) + min(max(q.x,max(q.y,q.z)),0.0) - r;
> }
>
> from the Inigo Quilez examples you posted earlier. I'm trying to figure out how
> to union/merge boxes together and then round them all together. The math is
> confusing me. I took enough calculus years ago I should be able to figure it
> out, lol. His SDF functions are very similar to isosurface functions, yet they
> are different enough I can't get them to match. In his SDF functions he is able
> to simply subtract r from the function to round a shape, but I can't get the
> isosurface functions to match that.
>
> Josh
In other words, I'm not sure what vector functions povray has. How would I
convert that function to a povray function?
Josh
Post a reply to this message
|
|