POV-Ray : Newsgroups : povray.general : Half a cylinder (with open ends) Server Time
1 Nov 2024 13:20:31 EDT (-0400)
  Half a cylinder (with open ends) (Message 1 to 10 of 18)  
Goto Latest 10 Messages Next 8 Messages >>>
From: Chaanakya
Subject: Half a cylinder (with open ends)
Date: 26 Jul 2012 09:20:01
Message: <web.5011437418f886087f523b7e0@news.povray.org>
Hey guys!

I was trying to create half of a hollow cylinder (both ends open).  I tried
using CSG with an intersection, and that gave me a half a hollow cylinder, but
I'd like to not have a plane on the end.  That is, I'd like essentially a curved
plane (the side of the cylinder without the endcaps).  Is there some
transformation I could use on, for example, a box to achieve this?

Thanks in advance!

- Chaanakya


Post a reply to this message

From: Warp
Subject: Re: Half a cylinder (with open ends)
Date: 26 Jul 2012 09:31:45
Message: <501146c1@news.povray.org>
Chaanakya <nomail@nomail> wrote:
> I was trying to create half of a hollow cylinder (both ends open).  I tried
> using CSG with an intersection, and that gave me a half a hollow cylinder, but
> I'd like to not have a plane on the end.  That is, I'd like essentially a curved
> plane (the side of the cylinder without the endcaps).  Is there some
> transformation I could use on, for example, a box to achieve this?

Just make a difference of the cylinder and another cylinder with a slightly
smaller radius and which is a bit longer ther the first cylinder.


Post a reply to this message

From: Chaanakya
Subject: Re: Half a cylinder (with open ends)
Date: 26 Jul 2012 09:55:01
Message: <web.50114b78c440f4797f523b7e0@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> Chaanakya <nomail@nomail> wrote:
> > I was trying to create half of a hollow cylinder (both ends open).  I tried
> > using CSG with an intersection, and that gave me a half a hollow cylinder, but
> > I'd like to not have a plane on the end.  That is, I'd like essentially a curved
> > plane (the side of the cylinder without the endcaps).  Is there some
> > transformation I could use on, for example, a box to achieve this?
>
> Just make a difference of the cylinder and another cylinder with a slightly
> smaller radius and which is a bit longer ther the first cylinder.

Thanks!  That lets me control the thickness of the resulting object.  How would
I cut it in half?

- Chaanakya


Post a reply to this message

From: Chaanakya
Subject: Re: Half a cylinder (with open ends)
Date: 26 Jul 2012 10:05:00
Message: <web.50114df0c440f4797f523b7e0@news.povray.org>
"Chaanakya" <nomail@nomail> wrote:
> Warp <war### [at] tagpovrayorg> wrote:
> > Chaanakya <nomail@nomail> wrote:
> > > I was trying to create half of a hollow cylinder (both ends open).  I tried
> > > using CSG with an intersection, and that gave me a half a hollow cylinder, but
> > > I'd like to not have a plane on the end.  That is, I'd like essentially a curved
> > > plane (the side of the cylinder without the endcaps).  Is there some
> > > transformation I could use on, for example, a box to achieve this?
> >
> > Just make a difference of the cylinder and another cylinder with a slightly
> > smaller radius and which is a bit longer ther the first cylinder.
>
> Thanks!  That lets me control the thickness of the resulting object.  How would
> I cut it in half?
>
> - Chaanakya

This is a bit weird....the shell seems way too thick when I render this:

#version 3.6;
#include "colors.inc"

global_settings {
  max_trace_level 256
  ambient_light White
  assumed_gamma 1.0
}

camera {
  location <10,0,0>
  look_at <0,0,0>
  //rotate <0,0,-clock*90>
}

light_source {
  <0,100,0>
  color White
}

plane {
  y, -10
  pigment { hexagon Green, White, Blue }
}

difference {
  cylinder { <-1,0,0>,<1,0,0>,1}
  cylinder { <-1.00003,0,0>,<1.00003,0,0>,0.99999999}
  pigment { color Red }
}

The shell should be barely visible, but it's quite thick.  Why?  Is it floating
point error?

- Chaanakya


Post a reply to this message

From: clipka
Subject: Re: Half a cylinder (with open ends)
Date: 26 Jul 2012 10:22:36
Message: <501152ac$1@news.povray.org>
Am 26.07.2012 16:02, schrieb Chaanakya:
> "Chaanakya" <nomail@nomail> wrote:
>> Warp <war### [at] tagpovrayorg> wrote:
>>> Chaanakya <nomail@nomail> wrote:
>>>> I was trying to create half of a hollow cylinder (both ends open).  I tried
>>>> using CSG with an intersection, and that gave me a half a hollow cylinder, but
>>>> I'd like to not have a plane on the end.  That is, I'd like essentially a curved
>>>> plane (the side of the cylinder without the endcaps).  Is there some
>>>> transformation I could use on, for example, a box to achieve this?
>>>
>>> Just make a difference of the cylinder and another cylinder with a slightly
>>> smaller radius and which is a bit longer ther the first cylinder.
>>
>> Thanks!  That lets me control the thickness of the resulting object.  How would
>> I cut it in half?
>>
>> - Chaanakya
>
> This is a bit weird....the shell seems way too thick when I render this:
>
> #version 3.6;
> #include "colors.inc"
>
> global_settings {
>    max_trace_level 256
>    ambient_light White
>    assumed_gamma 1.0
> }
>
> camera {
>    location <10,0,0>
>    look_at <0,0,0>
>    //rotate <0,0,-clock*90>
> }
>
> light_source {
>    <0,100,0>
>    color White
> }
>
> plane {
>    y, -10
>    pigment { hexagon Green, White, Blue }
> }
>
> difference {
>    cylinder { <-1,0,0>,<1,0,0>,1}
>    cylinder { <-1.00003,0,0>,<1.00003,0,0>,0.99999999}
>    pigment { color Red }
> }
>
> The shell should be barely visible, but it's quite thick.  Why?  Is it floating
> point error?

What you're seeing is just a perspective effect; change the camera 
location to e.g. <10,3,0> and light source position to e.g. <100,100,0> 
to better see what's goung on.


Post a reply to this message

From: Chaanakya
Subject: Re: Half a cylinder (with open ends)
Date: 26 Jul 2012 10:35:00
Message: <web.501154cfc440f4797f523b7e0@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 26.07.2012 16:02, schrieb Chaanakya:
> > "Chaanakya" <nomail@nomail> wrote:
> >> Warp <war### [at] tagpovrayorg> wrote:
> >>> Chaanakya <nomail@nomail> wrote:
> >>>> I was trying to create half of a hollow cylinder (both ends open).  I tried
> >>>> using CSG with an intersection, and that gave me a half a hollow cylinder, but
> >>>> I'd like to not have a plane on the end.  That is, I'd like essentially a
curved
> >>>> plane (the side of the cylinder without the endcaps).  Is there some
> >>>> transformation I could use on, for example, a box to achieve this?
> >>>
> >>> Just make a difference of the cylinder and another cylinder with a slightly
> >>> smaller radius and which is a bit longer ther the first cylinder.
> >>
> >> Thanks!  That lets me control the thickness of the resulting object.  How would
> >> I cut it in half?
> >>
> >> - Chaanakya
> >
> > This is a bit weird....the shell seems way too thick when I render this:
> >
> > #version 3.6;
> > #include "colors.inc"
> >
> > global_settings {
> >    max_trace_level 256
> >    ambient_light White
> >    assumed_gamma 1.0
> > }
> >
> > camera {
> >    location <10,0,0>
> >    look_at <0,0,0>
> >    //rotate <0,0,-clock*90>
> > }
> >
> > light_source {
> >    <0,100,0>
> >    color White
> > }
> >
> > plane {
> >    y, -10
> >    pigment { hexagon Green, White, Blue }
> > }
> >
> > difference {
> >    cylinder { <-1,0,0>,<1,0,0>,1}
> >    cylinder { <-1.00003,0,0>,<1.00003,0,0>,0.99999999}
> >    pigment { color Red }
> > }
> >
> > The shell should be barely visible, but it's quite thick.  Why?  Is it floating
> > point error?
>
> What you're seeing is just a perspective effect; change the camera
> location to e.g. <10,3,0> and light source position to e.g. <100,100,0>
> to better see what's goung on.

Ah I understand.  Thank you!  Is there any way to now cut that object in half
(without ending up with a plane "capping" it)?

- Chaanakya


Post a reply to this message

From: clipka
Subject: Re: Half a cylinder (with open ends)
Date: 26 Jul 2012 10:49:35
Message: <501158ff$1@news.povray.org>
Am 26.07.2012 16:31, schrieb Chaanakya:
> clipka <ano### [at] anonymousorg> wrote:
>> Am 26.07.2012 16:02, schrieb Chaanakya:
>>> "Chaanakya" <nomail@nomail> wrote:
>>>> Warp <war### [at] tagpovrayorg> wrote:
>>>>> Chaanakya <nomail@nomail> wrote:
>>>>>> I was trying to create half of a hollow cylinder (both ends open).  I tried
>>>>>> using CSG with an intersection, and that gave me a half a hollow cylinder, but
>>>>>> I'd like to not have a plane on the end.  That is, I'd like essentially a
curved
>>>>>> plane (the side of the cylinder without the endcaps).  Is there some
>>>>>> transformation I could use on, for example, a box to achieve this?
>>>>>
>>>>> Just make a difference of the cylinder and another cylinder with a slightly
>>>>> smaller radius and which is a bit longer ther the first cylinder.
>>>>
>>>> Thanks!  That lets me control the thickness of the resulting object.  How would
>>>> I cut it in half?
>>>>
>>>> - Chaanakya
>>>
>>> This is a bit weird....the shell seems way too thick when I render this:
>>>
>>> #version 3.6;
>>> #include "colors.inc"
>>>
>>> global_settings {
>>>     max_trace_level 256
>>>     ambient_light White
>>>     assumed_gamma 1.0
>>> }
>>>
>>> camera {
>>>     location <10,0,0>
>>>     look_at <0,0,0>
>>>     //rotate <0,0,-clock*90>
>>> }
>>>
>>> light_source {
>>>     <0,100,0>
>>>     color White
>>> }
>>>
>>> plane {
>>>     y, -10
>>>     pigment { hexagon Green, White, Blue }
>>> }
>>>
>>> difference {
>>>     cylinder { <-1,0,0>,<1,0,0>,1}
>>>     cylinder { <-1.00003,0,0>,<1.00003,0,0>,0.99999999}
>>>     pigment { color Red }
>>> }
>>>
>>> The shell should be barely visible, but it's quite thick.  Why?  Is it floating
>>> point error?
>>
>> What you're seeing is just a perspective effect; change the camera
>> location to e.g. <10,3,0> and light source position to e.g. <100,100,0>
>> to better see what's goung on.
>
> Ah I understand.  Thank you!  Is there any way to now cut that object in half
> (without ending up with a plane "capping" it)?

Yes: Introduce a plane to the difference.

Note how the plane only "caps" the object at the resulting cuts, in this 
case the walls of the tube. Before that, what you cut was a solid cylinder.

You need to think in terms of solid bodies (after all it's called CSG = 
Constructive Solid Geometry): If you have a solid cylindrical object, 
and a big planar tool to "disintegrate" part of it, your remaining 
object will be a solid semi-cylinder. OTOH, if you have a solid 
cylinder, use a cylindrical tool to "disintegrate" a cylindrical part at 
its center (giving you a tube with a measurable wall thickness), and 
then use that big planar tool, your remaining object will be a half-pipe 
(with a measurable wall thickness).


Post a reply to this message

From: Chaanakya
Subject: Re: Half a cylinder (with open ends)
Date: 26 Jul 2012 10:55:00
Message: <web.50115a06c440f4797f523b7e0@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 26.07.2012 16:31, schrieb Chaanakya:
> > clipka <ano### [at] anonymousorg> wrote:
> >> Am 26.07.2012 16:02, schrieb Chaanakya:
> >>> "Chaanakya" <nomail@nomail> wrote:
> >>>> Warp <war### [at] tagpovrayorg> wrote:
> >>>>> Chaanakya <nomail@nomail> wrote:
> >>>>>> I was trying to create half of a hollow cylinder (both ends open).  I tried
> >>>>>> using CSG with an intersection, and that gave me a half a hollow cylinder,
but
> >>>>>> I'd like to not have a plane on the end.  That is, I'd like essentially a
curved
> >>>>>> plane (the side of the cylinder without the endcaps).  Is there some
> >>>>>> transformation I could use on, for example, a box to achieve this?
> >>>>>
> >>>>> Just make a difference of the cylinder and another cylinder with a slightly
> >>>>> smaller radius and which is a bit longer ther the first cylinder.
> >>>>
> >>>> Thanks!  That lets me control the thickness of the resulting object.  How would
> >>>> I cut it in half?
> >>>>
> >>>> - Chaanakya
> >>>
> >>> This is a bit weird....the shell seems way too thick when I render this:
> >>>
> >>> #version 3.6;
> >>> #include "colors.inc"
> >>>
> >>> global_settings {
> >>>     max_trace_level 256
> >>>     ambient_light White
> >>>     assumed_gamma 1.0
> >>> }
> >>>
> >>> camera {
> >>>     location <10,0,0>
> >>>     look_at <0,0,0>
> >>>     //rotate <0,0,-clock*90>
> >>> }
> >>>
> >>> light_source {
> >>>     <0,100,0>
> >>>     color White
> >>> }
> >>>
> >>> plane {
> >>>     y, -10
> >>>     pigment { hexagon Green, White, Blue }
> >>> }
> >>>
> >>> difference {
> >>>     cylinder { <-1,0,0>,<1,0,0>,1}
> >>>     cylinder { <-1.00003,0,0>,<1.00003,0,0>,0.99999999}
> >>>     pigment { color Red }
> >>> }
> >>>
> >>> The shell should be barely visible, but it's quite thick.  Why?  Is it floating
> >>> point error?
> >>
> >> What you're seeing is just a perspective effect; change the camera
> >> location to e.g. <10,3,0> and light source position to e.g. <100,100,0>
> >> to better see what's goung on.
> >
> > Ah I understand.  Thank you!  Is there any way to now cut that object in half
> > (without ending up with a plane "capping" it)?
>
> Yes: Introduce a plane to the difference.
>
> Note how the plane only "caps" the object at the resulting cuts, in this
> case the walls of the tube. Before that, what you cut was a solid cylinder.
>
> You need to think in terms of solid bodies (after all it's called CSG =
> Constructive Solid Geometry): If you have a solid cylindrical object,
> and a big planar tool to "disintegrate" part of it, your remaining
> object will be a solid semi-cylinder. OTOH, if you have a solid
> cylinder, use a cylindrical tool to "disintegrate" a cylindrical part at
> its center (giving you a tube with a measurable wall thickness), and
> then use that big planar tool, your remaining object will be a half-pipe
> (with a measurable wall thickness).

Okay that makes sense.  Thank you so much clipka and warp! :)  You guys are
awesome :D

- Chaanakya


Post a reply to this message

From: Thomas de Groot
Subject: Re: Half a cylinder (with open ends)
Date: 26 Jul 2012 10:57:35
Message: <50115adf$1@news.povray.org>
On 26-7-2012 16:31, Chaanakya wrote:

> Ah I understand.  Thank you!  Is there any way to now cut that object in half
> (without ending up with a plane "capping" it)?
>

Just a hint: maybe this is described in the manual...? It is really 
worth reading and the writers have done a great job; they must feel 
frustrated if their work is not appreciated or used...  ;-)

Thomas


Post a reply to this message

From: Chaanakya
Subject: Re: Half a cylinder (with open ends)
Date: 26 Jul 2012 11:30:01
Message: <web.50116179c440f4797f523b7e0@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> On 26-7-2012 16:31, Chaanakya wrote:
>
> > Ah I understand.  Thank you!  Is there any way to now cut that object in half
> > (without ending up with a plane "capping" it)?
> >
>
> Just a hint: maybe this is described in the manual...? It is really
> worth reading and the writers have done a great job; they must feel
> frustrated if their work is not appreciated or used...  ;-)
>
> Thomas

I did read the manual.  I think I didn't completely understand exactly how CSG
worked (and clipka cleared that up for me).  Maybe I didn't search thoroughly
enough.  I did find how to cut a sphere in half somewhere in the manual, and I
tried copying that at first.  I didn't realize that the reason the cylinder
looked solid was because of other issues (not cutting the second cylinder out
properly).  Also, the example given in the manual with the hemisphere uses an
intersection, and the eventual solution here used a difference.  Yes, it's
pretty much the same thing, but as I said, I didn't really understand how CSG
worked.  I've actually been using the manual pretty heavily ;)


Post a reply to this message

Goto Latest 10 Messages Next 8 Messages >>>

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