POV-Ray : Newsgroups : povray.general : Intersection of cylinder and spherical shell Server Time
31 Jul 2024 04:20:46 EDT (-0400)
  Intersection of cylinder and spherical shell (Message 3 to 12 of 12)  
<<< Previous 2 Messages Goto Initial 10 Messages
From: Zeger Knaepen
Subject: Re: Intersection of cylinder and spherical shell
Date: 14 Feb 2008 18:27:09
Message: <47b4ce4d@news.povray.org>
read the manual, hollow only has meaning if you're using media or fog

why is that keyword so hard to understand? seems like every beginner gets it 
wrong.

Maybe for POV-Ray 4 it should be replaced by something more self-explaining, 
something like "atmosphere on" or so, dunno

cu!
-- 
#macro G(b,e)b+(e-b)*C/50#end#macro _(b,e,k,l)#local C=0;#while(C<50)
sphere{G(b,e)+3*z.1pigment{rgb G(k,l)}finish{ambient 1}}#local C=C+1;
#end#end _(y-x,y,x,x+y)_(y,-x-y,x+y,y)_(-x-y,-y,y,y+z)_(-y,y,y+z,x+y)
_(0x+y.5+y/2x)_(0x-y.5+y/2x)            // ZK http://www.povplace.com


Post a reply to this message

From: thisroad
Subject: Re: Intersection of cylinder and spherical shell
Date: 14 Feb 2008 21:50:00
Message: <web.47b4fdb672c7bea14915bbf10@news.povray.org>
Triple_R, thanks for the input!  I'll play around with that and see what
happens.  It seems like there would be a simple way to create this -- maybe
differencing this sphere with one that's marginally smaller would work.


Zeger, I've read the manual and, in fact, am using 'hollow' precisely because
there's fog in the scene.




"triple_r" <rre### [at] hotmailcom> wrote:
> "thisroad" <nomail@nomail> wrote:
>
> > When I run this, it appears that the sphere is always treated like a solid
> > object -- I can get the cylinder inside the sphere, or outside if I use
> > "inverse", but not the true intersection points.  Deleting "hollow" doesn't
> > change the behavior.  What should I do differently?
>
>
> What about this?
>
> sphere{<0,0,0>,4
>   clipped_by{
>      cylinder{PStart,PEnd,0.5}
>   }
>   pigment{rgb y}
> }
> ......
>
>  - Ricky







"Zeger Knaepen" <zeg### [at] povplacecom> wrote:
> read the manual, hollow only has meaning if you're using media or fog
>
> why is that keyword so hard to understand? seems like every beginner gets it
> wrong.
>
> Maybe for POV-Ray 4 it should be replaced by something more self-explaining,
> something like "atmosphere on" or so, dunno
>
> cu!
> --
> #macro G(b,e)b+(e-b)*C/50#end#macro _(b,e,k,l)#local C=0;#while(C<50)
> sphere{G(b,e)+3*z.1pigment{rgb G(k,l)}finish{ambient 1}}#local C=C+1;
> #end#end _(y-x,y,x,x+y)_(y,-x-y,x+y,y)_(-x-y,-y,y,y+z)_(-y,y,y+z,x+y)
> _(0x+y.5+y/2x)_(0x-y.5+y/2x)            // ZK http://www.povplace.com


Post a reply to this message

From: Warp
Subject: Re: Intersection of cylinder and spherical shell
Date: 15 Feb 2008 03:07:51
Message: <47b54857@news.povray.org>
thisroad <nomail@nomail> wrote:
>  sphere{<0,0,0>,4 hollow

  'hollow' does not affect geometry. It's a keyword related exclusively
to media and fog, nothing else. If there is no media/fog, 'hollow' is a
no-op.

-- 
                                                          - Warp


Post a reply to this message

From: Warp
Subject: Re: Intersection of cylinder and spherical shell
Date: 15 Feb 2008 03:09:58
Message: <47b548d6@news.povray.org>
Zeger Knaepen <zeg### [at] povplacecom> wrote:
> why is that keyword so hard to understand? seems like every beginner gets it 
> wrong.

  Not only that, 'hollow' is often used as a cure-all remedy for every
possible imaginable problem people encounter. For example, I have seen
it suggested when someone had problems with rendering artifacts with an
isosurface.

-- 
                                                          - Warp


Post a reply to this message

From: Chris B
Subject: Re: Intersection of cylinder and spherical shell
Date: 15 Feb 2008 03:46:31
Message: <47b55167@news.povray.org>
"thisroad" <nomail@nomail> wrote in message 
news:web.47b4fdb672c7bea14915bbf10@news.povray.org...
> Triple_R, thanks for the input!  I'll play around with that and see what
> happens.  It seems like there would be a simple way to create this --  
> maybe
> differencing this sphere with one that's marginally smaller would work.
>

If you want to see the two rings where the surfaces of the sphere and the 
cylinder touch you'll need to give them some thickness. Yes, you can do this 
for the sphere by differencing a smaller sphere. You can do the same for the 
cylinder by differencing it with another cylinder of a smaller radius.

intersection {
  difference {
    sphere {...}  // Big Sphere
    sphere {...}  // Smaller Sphere
  }
  difference {
    cylinder {...} // Big Cylinder
    cylinder {...} // Smaller Cylinder
  }
}

You shouldn't need the 'open' keyword on the cylinder.

Regards,
Chris B.


Post a reply to this message

From: Arne Kleinophorst
Subject: Re: Intersection of cylinder and spherical shell
Date: 15 Feb 2008 04:40:30
Message: <47b55e0e@news.povray.org>
Maybe this would be clearer if the keyword wouldn't be hollow but 
something else. 'Hollow' does have a meaning which simply doesn't fit 
its purpose.

just my 2 cents

Warp schrieb:
> thisroad <nomail@nomail> wrote:
>>  sphere{<0,0,0>,4 hollow
> 
>   'hollow' does not affect geometry. It's a keyword related exclusively
> to media and fog, nothing else. If there is no media/fog, 'hollow' is a
> no-op.
>


Post a reply to this message

From: Alain
Subject: Re: Intersection of cylinder and spherical shell
Date: 15 Feb 2008 17:12:27
Message: <47b60e4b$1@news.povray.org>
Chris B nous apporta ses lumieres en ce 2008/02/15 03:44:
> "thisroad" <nomail@nomail> wrote in message 
> news:web.47b4fdb672c7bea14915bbf10@news.povray.org...
>> Triple_R, thanks for the input!  I'll play around with that and see what
>> happens.  It seems like there would be a simple way to create this --  
>> maybe
>> differencing this sphere with one that's marginally smaller would work.
>>
> 
> If you want to see the two rings where the surfaces of the sphere and the 
> cylinder touch you'll need to give them some thickness. Yes, you can do this 
> for the sphere by differencing a smaller sphere. You can do the same for the 
> cylinder by differencing it with another cylinder of a smaller radius.
> 
> intersection {
>   difference {
>     sphere {...}  // Big Sphere
>     sphere {...}  // Smaller Sphere
>   }
>   difference {
>     cylinder {...} // Big Cylinder
>     cylinder {...} // Smaller Cylinder
>   }
> }
> 
> You shouldn't need the 'open' keyword on the cylinder.
> 
> Regards,
> Chris B. 
> 
> 
Make the inside cylinder a bit longer than the outer one. If they are the same 
length, you'll have coincident surfaces at each ends.

-- 
Alain
-------------------------------------------------
You know you've been raytracing too long when your source files are starting to 
get bigger than the image files.
     -- Matt


Post a reply to this message

From: Chris B
Subject: Re: Intersection of cylinder and spherical shell
Date: 15 Feb 2008 17:48:07
Message: <47b616a7$1@news.povray.org>
"Alain" <ele### [at] netscapenet> wrote in message 
news:47b60e4b$1@news.povray.org...
>
> Make the inside cylinder a bit longer than the outer one. If they are the 
> same length, you'll have coincident surfaces at each ends.
>
> -- 
> Alain
>

That's good general advice. In this case it's not going to make a difference 
as the ends of the cylinders won't be part of the results of the 
intersection anyway.

Regards,
Chris B.


Post a reply to this message

From: Slime
Subject: Re: Intersection of cylinder and spherical shell
Date: 16 Feb 2008 01:06:47
Message: <47b67d77@news.povray.org>
> Maybe this would be clearer if the keyword wouldn't be hollow but
> something else. 'Hollow' does have a meaning which simply doesn't fit
> its purpose.

The thing that bugs me about "hollow," besides its ambiguity, is that I
almost always want it. My only experience with hollow is this: I make a
media filled object and render it, and there's no media. "Oops, I forgot to
say 'hollow'." I add the keyword and the image renders the way I intended.
It seems to be much more frequent that you want an object to be hollow than
that you don't.

So, I'd suggest removing it and adding a "no_media" keyword that specifies
when an object *shouldn't* allow media inside it. Even better:
"no_external_media" so that you can disallow external media while still
having internal media that is different. (For instance, a ball of red glass
in a room that has blue fog.)

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: William Tracy
Subject: Re: Intersection of cylinder and spherical shell
Date: 16 Feb 2008 16:06:40
Message: <47b75060$1@news.povray.org>
Slime wrote:
> So, I'd suggest removing it and adding a "no_media" keyword that specifies
> when an object *shouldn't* allow media inside it.

Indeed.

What was the original purpose of the keyword, anyway? I would guess that 
Povray performs some speed optimization that is not possible once the 
keyword is added, but if so I can't see the result in my render times.

Otherwise, it would seem obvious to me that adding interior { media { 
... } } means that you want media, regardless of what other keywords are 
or aren't present. :-)

-- 
William Tracy
afi### [at] gmailcom -- wtr### [at] calpolyedu

One major known problem with supporting V-class is the complexity of its 
PCI bus adapter (EPIC and SAGA). Support for the V-class isn't going to 
happen until some really masochistic person who has access to a V-class 
is, uh, challenged by this.
     -- from the Linux-on-HPPA FAQ


Post a reply to this message

<<< Previous 2 Messages Goto Initial 10 Messages

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