POV-Ray : Newsgroups : povray.general : Help me with Iso-Surface Server Time
15 Nov 2024 03:21:44 EST (-0500)
  Help me with Iso-Surface (Message 1 to 4 of 4)  
From: Chris Capel
Subject: Help me with Iso-Surface
Date: 11 Apr 1999 19:28:55
Message: <37112227.0@news.povray.org>
I just downloaded the Iso-Surface patch and I want to use it with Pov to
create a stone block to build a castle wall with.  The rounded_box function
works fine as far as shape, but I need to figure out how to add a normal
function to it.  I am totally new to Iso-Surface, so any help would be
appreciated.

Chris Capel


Post a reply to this message

From: Thomas Willhalm
Subject: Re: Help me with Iso-Surface
Date: 12 Apr 1999 12:42:36
Message: <qqmvhf126dd.fsf@goldach.fmi.uni-konstanz.de>
"Chris Capel" <chr### [at] hotmailcom> writes:

> I just downloaded the Iso-Surface patch and I want to use it with Pov to
> create a stone block to build a castle wall with.  The rounded_box function
> works fine as far as shape, but I need to figure out how to add a normal
> function to it.  I am totally new to Iso-Surface, so any help would be
> appreciated.

I assume that you actually want to modify the shape of the rounded_box
and not only the normal. Let me first talk about how isosurfaces work.

Given a function 
f: IR^3     -> IR 
   (x,y,z) |-> f(x,y,z)
the isosurface is the set of points where the function f evaluates to 
zero. So modifying the object results in modifying the function.
For some small changes of the surface, it is sufficent to add one
or more noisy functions to f. Of course, the values should be small
compared to the values of f.

So, you will have to add some modifying terms to the rounded_box function.
An example how this can be achieved is the grid at
http://www.public.usit.net/rsuzuki/e/povray/iso/exmpl1.html#rusty_mesh
It should be possible to apply this technique to rounded_box to get some
nice stones.

I hope this helps.

Thomas

-- 
http://www.fmi.uni-konstanz.de/~willhalm


Post a reply to this message

From: Chris Capel
Subject: Re: Help me with Iso-Surface
Date: 12 Apr 1999 21:41:53
Message: <371292d1.0@news.povray.org>
This would help, except that I can not for my life figure out how to use the
noise3d function in conjunction with the rounded_box function.  Could you
perhaps give an example of this?

Chris Capel


Post a reply to this message

From: Thomas Willhalm
Subject: Re: Help me with Iso-Surface
Date: 15 Apr 1999 08:34:28
Message: <qqmemlmdsn0.fsf@goldach.fmi.uni-konstanz.de>
"Chris Capel" <chr### [at] hotmailcom> writes:

> This would help, except that I can not for my life figure out how to use the
> noise3d function in conjunction with the rounded_box function.  Could you
> perhaps give an example of this?

Hmmm. There is a problem that didn't see previously: The rounded_box
function uses the bounding box to determine its size. That's why the
combination with noise3d isn't straight forward.

It is however simple to redefine the superquadric ellipsoid with
the isosurface patch. This function can than be modified. An example
of a stone is given below.

Thomas


// ---------------------------- start pov scene ----------------------------
camera { location<15,40,-35>  direction<0,0,5.5> look_at<0,0,0>}

light_source {<-50, 40, -20> color <1,1,1>}
light_source {<  0, 50, -50> color <1,1,1>}
background {color <0.65,0.72,0.72>}

#declare P0=0.2
#declare P1=0.2
#declare BOX = function { ( abs(x)^(2/P0) + abs(y)^(2/P0) ) ^ (P0/P1)
  + abs(z)^(2/P1) - 1}

#declare RUSTY_BOX =
    function{ BOX(x,y,z) + 0.2*noise3d(40*x,40*y,40*z) }

isosurface {
  function { RUSTY_BOX }
  bounded_by{ box {<-1.1, -1.1, -1.1>, <1.1, 1.1, 1.1>}} 
  eval
  threshold  0.18
  method 2
  pigment {colour <0.65,0.3,0.1>}
  finish {ambient 0.3}
  scale 3
}
// ---------------------------- end pov scene ----------------------------


-- 
http://www.fmi.uni-konstanz.de/~willhalm


Post a reply to this message

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