POV-Ray : Newsgroups : povray.newusers : bounded by question Server Time
28 Nov 2024 17:49:16 EST (-0500)
  bounded by question (Message 1 to 10 of 11)  
Goto Latest 10 Messages Next 1 Messages >>>
From: Tom Melly
Subject: bounded by question
Date: 24 Mar 2000 15:03:04
Message: <38dbc9f8@news.povray.org>
With the following difference object, should I set my own bounded_by or will
POV bound the object to the box? I'm using megapov, but if there is a
difference I would be curious to know the answer for both standard and mega.
Thanks.

#declare sphere_slice =
sphere
{
  <-90.75, 7, 0> // center of sphere <X Y Z>
  90       // radius of sphere
}

difference{
  box{
    <-1, -4, -1>  // one corner position <X1 Y1 Z1>
    < 1,  8,  1>  // other corner position <X2 Y2 Z2>
  }
  object{sphere_slice}
  object{sphere_slice rotate y*90}
  object{sphere_slice rotate y*180}
  object{sphere_slice rotate y*-90}
  pigment{White}
}


--
Tom Melly
tom### [at] tomandluforce9couk
http://www.tomandlu.force9.co.uk


Post a reply to this message

From: Ron Parker
Subject: Re: bounded by question
Date: 24 Mar 2000 15:09:25
Message: <38dbcb75$1@news.povray.org>
On Thu, 23 Mar 2000 21:23:02 -0000, Tom Melly wrote:
>With the following difference object, should I set my own bounded_by or will
>POV bound the object to the box? I'm using megapov, but if there is a
>difference I would be curious to know the answer for both standard and mega.

An intersection takes the intersection of the bounding boxes of all of the
included objects (where they exist; see the recent discussion of intersecting
with a plane.)  It ignores objects that are inverted.  Difference is stored
internally as an intersection with inverses.  Thus, most differences are 
bounded by the bounding box of the first object in the difference (This does
not apply to differences that include inverted objects.)

Thus, your difference is bounded by the box and the spheres are ignored.  If
you can bound it more accurately, you should.

-- 
These are my opinions.  I do NOT speak for the POV-Team.
The superpatch: http://www2.fwi.com/~parkerr/superpatch/
My other stuff: http://www2.fwi.com/~parkerr/traces.html


Post a reply to this message

From: Tom Melly
Subject: Re: bounded by question
Date: 27 Mar 2000 06:50:02
Message: <38df4aea@news.povray.org>
Ron Parker <ron### [at] povrayorg> wrote in message
news:38dbcb75$1@news.povray.org...

> ..... Thus, most differences are
> bounded by the bounding box of the first object in the difference (This
does
> not apply to differences that include inverted objects.)
>
> Thus, your difference is bounded by the box and the spheres are ignored.
If
> you can bound it more accurately, you should.
>

That's what I expected - ie. the differenced object can not be larger than
the first object in the difference so apply that objects bounding. What's an
inverted object?


Post a reply to this message

From: Ron Parker
Subject: Re: bounded by question
Date: 27 Mar 2000 08:57:44
Message: <38df68d8@news.povray.org>
On Mon, 27 Mar 2000 12:49:56 +0100, Tom Melly wrote:
>
>Ron Parker <ron### [at] povrayorg> wrote in message
>news:38dbcb75$1@news.povray.org...
>
>> ..... Thus, most differences are
>> bounded by the bounding box of the first object in the difference (This
>does
>> not apply to differences that include inverted objects.)
>>
>> Thus, your difference is bounded by the box and the spheres are ignored.
>If
>> you can bound it more accurately, you should.
>>
>
>That's what I expected - ie. the differenced object can not be larger than
>the first object in the difference so apply that objects bounding. What's an
>inverted object?

One with the 'inverse' flag.  That is, 

  difference {
    sphere {0,1}
    sphere {x,1 inverse}
  }

is actually bounded by a tighter box than the one around the first sphere.
That's because it's actually an intersection of the two spheres, of course, 
but more complicated objects might have dozens of components in the difference
where only one or two are inversed like this.  In that case, the intersection
of all their bounding boxes is the bounding box of the object.  Also, you can
always rewrite such a difference unambiguously without the inverses:

  difference {
    object {A}
    object {B}
    object {C inverse}   
    object {D}
  }

can be rewritten as
  
  difference {
    intersection {
      object {A}
      object {C}
    }
    object {B}
    object {D}
  }



-- 
These are my opinions.  I do NOT speak for the POV-Team.
The superpatch: http://www2.fwi.com/~parkerr/superpatch/
My other stuff: http://www2.fwi.com/~parkerr/traces.html


Post a reply to this message

From: Tom Melly
Subject: Re: bounded by question
Date: 29 Mar 2000 04:34:47
Message: <38e1ce37$1@news.povray.org>
Ron Parker <ron### [at] povrayorg> wrote in message
news:38df68d8@news.povray.org...
> On Mon, 27 Mar 2000 12:49:56 +0100, Tom Melly wrote:
>
> One with the 'inverse' flag.
> ......

Many thanks - never clocked this flag before, I'll have a play with it.


Post a reply to this message

From: Steve
Subject: Re: bounded by question
Date: 29 Mar 2000 07:19:09
Message: <slrn8e3nu0.tc.sjlen@zero-pps.localdomain>
On Wed, 29 Mar 2000 10:34:45 +0100, Tom Melly wrote:
>
>Ron Parker <ron### [at] povrayorg> wrote in message
>news:38df68d8@news.povray.org...
>> On Mon, 27 Mar 2000 12:49:56 +0100, Tom Melly wrote:
>>
>> One with the 'inverse' flag.
>> ......
>
>Many thanks - never clocked this flag before, I'll have a play with it.

I've only come accross 'inverse' when using two planes in a scene, I got
a message saying that the camera was inside a non hollow object, to 
get rid of that message I had to make one of the planes inverse. 

-- 
Cheers
Steve              email mailto:sjl### [at] ndirectcouk

%HAV-A-NICEDAY Error not enough coffee  0 pps. 

web http://www.ndirect.co.uk/~sjlen/

or  http://start.at/zero-pps

 11:46am  up 12:35,  3 users,  load average: 1.07, 1.08, 1.07


Post a reply to this message

From: Warp
Subject: Re: bounded by question
Date: 29 Mar 2000 08:17:02
Message: <38e2024d@news.povray.org>
Steve <sjl### [at] ndirectcouk> wrote:
: I've only come accross 'inverse' when using two planes in a scene, I got
: a message saying that the camera was inside a non hollow object, to 
: get rid of that message I had to make one of the planes inverse. 

  Well, that's one way of doing it. The correct way would be reversing the
normal of the plane. The normal should always point outside the plane.

  There's one use for the inverse that I use very often: If you need a
real skysphere (ie. a sky sphere made with a real sphere):

sphere { 0,10000 inverse texture { Sky } }

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Tom Melly
Subject: Re: bounded by question
Date: 29 Mar 2000 10:27:46
Message: <38e220f2$1@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote in message news:38e2024d@news.povray.org...
>
>   There's one use for the inverse that I use very often: If you need a
> real skysphere (ie. a sky sphere made with a real sphere):
>
> sphere { 0,10000 inverse texture { Sky } }
>

Why not

sphere { 0,10000 hollow on texture { Sky } }

Is there a difference or is it just preference? (Actually, I like your
method - the idea of a sphere who's inside is the rest of the universe is,
well, bizarre and intriguing)


Post a reply to this message

From: Warp
Subject: Re: bounded by question
Date: 29 Mar 2000 10:47:21
Message: <38e22589@news.povray.org>
Tom Melly <tom### [at] tomandluforce9couk> wrote:
: Why not

: sphere { 0,10000 hollow on texture { Sky } }

  Because that's a misuse of the hollow keyword. Also the normals get
inverted.
  It's mostly a preference, but I like to be precise. It's more intuitive
(to me) to define well the inside and the outside of the object. Some
features work differently depending on whether we are inside or outside.
  If I wanted, for example, a media outside the sky sphere (which is
actually the inside of the object), it would be possible. In this case
the sky sphere would have to be inversed and hollow.

  I'm a hopeless perfectionist.

  Btw: Any hope of getting the 'hollow' keyword changed to something better,
like 'allow_media' or 'container' or 'media_container' ?

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Ron Parker
Subject: Re: bounded by question
Date: 29 Mar 2000 10:59:46
Message: <slrn8e4a76.4g2.ron.parker@linux.parkerr.fwi.com>
On 29 Mar 2000 10:47:21 -0500, Warp wrote:
>  If I wanted, for example, a media outside the sky sphere (which is
>actually the inside of the object), it would be possible. In this case
>the sky sphere would have to be inversed and hollow.

Possible, but not useful.  Media effects only get calculated when the
ray LEAVES the object.


Post a reply to this message

Goto Latest 10 Messages Next 1 Messages >>>

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