POV-Ray : Newsgroups : povray.newusers : OK, this time really counts... Server Time
30 Jul 2024 16:19:51 EDT (-0400)
  OK, this time really counts... (Message 1 to 7 of 7)  
From: Matthew Pace
Subject: OK, this time really counts...
Date: 5 Nov 2003 20:32:36
Message: <matt-pace-7B05E0.17323505112003@netplex.aussie.org>
Last time I asked a isosurface question, it was a stupid error on my 
part, and thats what I get for coding too late at nite...  This time, 
though, I am really confused.  IF (IF) I understand isosurfaced 
correctly here, (tell me if Im wrong), POV checks to see which parts of 
the containing box fit into the function to equal the threshold.  if 
this is true, take the following scene:

camera
{
   location <3,12,-15>
   look_at  <0,0,0>
}

light_source
{
   <5,14,-10>
   color rgb <2,2,2>
   area_light
   <3,0,0>,<0,0,3>,5,5
   adaptive 1
   jitter
}

isosurface
{
   function{-y}
   threshold 0
   contained_by{sphere{0,5}}
   pigment
   {
      color rgb <1,1,1>
   }
}


and help me out here. 

1) Wouldnt just a plane show up?  y equals 0 on only one plane, doesnt 
it?
2) If y is negative, why is the positive part of the sphere shaded?


thanks a lot.


Post a reply to this message

From: Warp
Subject: Re: OK, this time really counts...
Date: 5 Nov 2003 20:46:23
Message: <3fa9a7ef@news.povray.org>
Matthew Pace <mat### [at] lycoscom> wrote:
> 1) Wouldnt just a plane show up?  y equals 0 on only one plane, doesnt 
> it?

  By default POV-Ray will take any point which is *inside* the isosurface
as the surface of the object. This means that if the surface of the
container object is inside the isosurface, it will show up.
  You can use "open" to stop it from doing this.

> 2) If y is negative, why is the positive part of the sphere shaded?

  Because it makes the check -y<0, which is the same as y>=0.

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Matthew Pace
Subject: Re: OK, this time really counts...
Date: 5 Nov 2003 21:04:19
Message: <matt-pace-F64595.18041905112003@netplex.aussie.org>
In article <3fa9a7ef@news.povray.org>, Warp <war### [at] tagpovrayorg> 
wrote:

> Matthew Pace <mat### [at] lycoscom> wrote:
> > 1) Wouldnt just a plane show up?  y equals 0 on only one plane, doesnt 
> > it?
> 
>   By default POV-Ray will take any point which is *inside* the isosurface
> as the surface of the object. This means that if the surface of the
> container object is inside the isosurface, it will show up.
>   You can use "open" to stop it from doing this.
> 

Oh ok, thanks, I should have guessed...

> > 2) If y is negative, why is the positive part of the sphere shaded?
> 
>   Because it makes the check -y<0, which is the same as y>=0.

And that makes sense too, because what is inside a function is generally 
considered to be true too.  Thanks.  Last question:  is there a way to 
make it so that it is function=threshold?  Thanks


Post a reply to this message

From: Matthew Pace
Subject: Re: OK, this time really counts...
Date: 5 Nov 2003 21:18:01
Message: <matt-pace-A623ED.18180105112003@netplex.aussie.org>
nevermind that last post...


Post a reply to this message

From: Mike Williams
Subject: Re: OK, this time really counts...
Date: 5 Nov 2003 21:19:11
Message: <QUzMZFAk9aq$EwWG@econym.demon.co.uk>
Wasn't it Matthew Pace who wrote:
>Last time I asked a isosurface question, it was a stupid error on my 
>part, and thats what I get for coding too late at nite...  This time, 
>though, I am really confused.  IF (IF) I understand isosurfaced 
>correctly here, (tell me if Im wrong), POV checks to see which parts of 
>the containing box fit into the function to equal the threshold. 
>
>
>1) Wouldnt just a plane show up?  y equals 0 on only one plane, doesnt 
>it?

Because you missed out the "open" keyword.

When the contained_by object is "closed", you see the parts of the
container that intersect with the inside of the isosurface. It's like
the difference between intersection and clipped_by in CSG.

So the shape you see is the intersection of the inside of the sphere and
the inside of the isosurface.

>2) If y is negative, why is the positive part of the sphere shaded?

The inside of an isosurface is considered to be the places where the
function has a negative value. (The function is positive outside and
zero on the surface). The logic is exactly the same as the following CSG
operation. The inside of the {-y,0} plane is in the positive y
direction.

intersection {
  plane {-y,0}
  sphere {0,5}
  pigment {rgb 1}
}

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Christopher James Huff
Subject: Re: OK, this time really counts...
Date: 5 Nov 2003 21:47:00
Message: <cjameshuff-EB9E52.21464205112003@netplex.aussie.org>
In article <mat### [at] netplexaussieorg>,
 Matthew Pace <mat### [at] lycoscom> wrote:

> Last time I asked a isosurface question, it was a stupid error on my 
> part, and thats what I get for coding too late at nite...  This time, 
> though, I am really confused.  IF (IF) I understand isosurfaced 
> correctly here, (tell me if Im wrong), POV checks to see which parts of 
> the containing box fit into the function to equal the threshold.  if 
> this is true, take the following scene:

I don't really understand your explanation of what you think happens, so 
I will just explain what happens. ;-)
An isosurface is a surface composed of all points where a function is 
equal to a certain threshold value. All points where that function is 
less than the threshold are considered "inside" the isosurface. Because 
of computational constraints, the isosurface shape in POV-Ray limits 
isosurfaces to within a container shape. By default, if a part of the 
container is inside the isosurface, it is considered part of the 
surface. Using the "open" keyword will remove these container surfaces, 
giving you holes into the interior of the isosurface where it intersects 
its container.


> 1) Wouldnt just a plane show up?  y equals 0 on only one plane, doesnt 
> it?

A plane and all parts of the container where the function is less than 
the threshold.


> 2) If y is negative, why is the positive part of the sphere shaded?

By "shaded" I assume you mean present...and the +y half of the container 
is visible because -y is below the threshold for those points.
Hope this helped...

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Christoph Hormann
Subject: Re: OK, this time really counts...
Date: 6 Nov 2003 04:02:02
Message: <41ep71-kc2.ln1@triton.imagico.de>
Matthew Pace wrote:
> Last time I asked a isosurface question, it was a stupid error on my 
> part, and thats what I get for coding too late at nite...  This time, 
> though, I am really confused.  IF (IF) I understand isosurfaced 
> correctly here, (tell me if Im wrong), POV checks to see which parts of 
> the containing box fit into the function to equal the threshold.  if 
> this is true, take the following scene:
> [...]

This is all explained in the isosurface tutorial in the documentation:

http://www.povray.org/documentation/view/61/

BTW: It is a good idea to use a subject line that actually tells 
something about the content of the posting...

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 25 Oct. 2003 _____./\/^>_*_<^\/\.______


Post a reply to this message

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