POV-Ray : Newsgroups : povray.newusers : Smooth the corners in the intersection of two tubes Server Time
1 Jul 2024 03:25:04 EDT (-0400)
  Smooth the corners in the intersection of two tubes (Message 1 to 10 of 11)  
Goto Latest 10 Messages Next 1 Messages >>>
From: NoOneEagle
Subject: Smooth the corners in the intersection of two tubes
Date: 30 Jan 2011 09:55:01
Message: <web.4d457aded8bbabf0fbde73370@news.povray.org>
I'm faily new and have looked through the FAQ's but haven't found an answer
yet...

I have ends of two tubes coming together at a 90 degree angle and it looks
just like two tubes coming together. How do I achieve the effect of a corner,
like in a picture frame at the corners, instead of the "overlapping" look of
just two tubes coming together and if you have an answer would you have a short
code showing such?


Post a reply to this message

From: Stephen
Subject: Re: Smooth the corners in the intersection of two tubes
Date: 30 Jan 2011 10:26:48
Message: <4d458338@news.povray.org>
On 30/01/2011 2:53 PM, NoOneEagle wrote:
> I'm faily new and have looked through the FAQ's but haven't found an answer
> yet...
>
> I have ends of two tubes coming together at a 90 degree angle and it looks
> just like two tubes coming together. How do I achieve the effect of a corner,
> like in a picture frame at the corners, instead of the "overlapping" look of
> just two tubes coming together and if you have an answer would you have a short
> code showing such?
>
>
>

Difference a cube, rotated at 45 degrees from a cylinder and translated 
so the edge touches the outside of the cylinder.

difference {
  cylinder {
   -0.5*y,0.5*y,1.0
   scale     <1.0,10.0,1.0>
   translate <0.0,5.0,0.0>
  }

  box {
   < -0.50, -0.50, -0.50 >, < 0.50, 0.50, 0.50 >
   scale     <3.0,3.0,3.0>
   rotate    <0.0,0.0,45.0>
   translate <1.112,0.0,0.0> /* translated so the edge touches the 
outside of the cylinder */
  }

}



-- 
Regards
     Stephen


Post a reply to this message

From: NoOneEagle
Subject: Re: Smooth the corners in the intersection of two tubes
Date: 30 Jan 2011 11:25:01
Message: <web.4d458f66edc3acfcfbde73370@news.povray.org>
Stephen <mcavoys_at@aoldotcom> wrote:
> On 30/01/2011 2:53 PM, NoOneEagle wrote:
> > I'm fairly new and have looked through the FAQ's but haven't found an answer
> > yet...
> >
> > I have ends of two tubes coming together at a 90 degree angle and it looks
> > just like two tubes coming together. How do I achieve the effect of a corner,
> > like in a picture frame at the corners, instead of the "overlapping" look of
> > just two tubes coming together and if you have an answer would you have a short
> > code showing such?
> >
>
>
>
> --
> Regards
>      Stephen

Ok, I don't want to seem ignorant, but I am new to POV... Just two days, but am
a quick learner if I can see implimented code... I have learned a lot of basic
shapes and shadings and textures and am just starting to put things together. So
I can kind of see where your code could help but I can't quite grasp how to put
it into my code... Here's what I have and what you put out there...

// camera position
camera {
  location <0,0,-20>
  look_at <0,0,0>
}

// light
light_source {<-15,15,-15>
  color rgb <1,1,1>   }


 //verticle center
  cylinder {
   <0, 4, 0>, <0, -4, 0>, 0.60
   pigment { color rgb <1,0,0> }
  finish { phong 4.9}
}


  //horzontal center
  cylinder {
   <3, 3.5, 0>, <-.56, 3.5 , 0>, 0.60
   pigment { color rgb <1,0,0> }
  finish { phong 4.9}
}

 /* This is what you suggested but I can't see "where" i place it in my code or
how...

 difference {
  cylinder {
   -0.5*y,0.5*y,1.0
   scale     <1.0,10.0,1.0>
   translate <0.0,5.0,0.0>
  }

  box {
   < -0.50, -0.50, -0.50 >, < 0.50, 0.50, 0.50 >
   scale     <3.0,3.0,3.0>
   rotate    <0.0,0.0,45.0>
   translate <1.112,0.0,0.0>  translated so the edge touches the
outside of the cylinder
  }

}
*/

If you could put your code into this short piece I have, then I could understand
it better but as it is, I'm just learning and am having a hard time putting it
into perspective, the whole concept of drawing in 3 demensions through code is
still kind of sinking in but I'm learning...

Thanks for the help so far. (grin)


Post a reply to this message

From: NoOneEagle
Subject: Re: Smooth the corners in the intersection of two tubes
Date: 30 Jan 2011 11:25:01
Message: <web.4d45902aedc3acfcfbde73370@news.povray.org>
Stephen <mcavoys_at@aoldotcom> wrote:
> On 30/01/2011 2:53 PM, NoOneEagle wrote:
> > I'm faily new and have looked through the FAQ's but haven't found an answer
> > yet...
> >
> > I have ends of two tubes coming together at a 90 degree angle and it looks
> > just like two tubes coming together. How do I achieve the effect of a corner,
> > like in a picture frame at the corners, instead of the "overlapping" look of
> > just two tubes coming together and if you have an answer would you have a short
> > code showing such?
> >
> >
> >
>
> Difference a cube, rotated at 45 degrees from a cylinder and translated
> so the edge touches the outside of the cylinder.
>
> difference {
>   cylinder {
>    -0.5*y,0.5*y,1.0
>    scale     <1.0,10.0,1.0>
>    translate <0.0,5.0,0.0>
>   }
>
>   box {
>    < -0.50, -0.50, -0.50 >, < 0.50, 0.50, 0.50 >
>    scale     <3.0,3.0,3.0>
>    rotate    <0.0,0.0,45.0>
>    translate <1.112,0.0,0.0> /* translated so the edge touches the
> outside of the cylinder */
>   }
>
> }
>
>
>
> --
> Regards
>      Stephen

Oh, I studied your response again and am grasping the idea you posted... I'll
try it again a few times... Thanks...


Post a reply to this message

From: NoOneEagle
Subject: Re: Smooth the corners in the intersection of two tubes
Date: 30 Jan 2011 11:45:00
Message: <web.4d459516edc3acfcfbde73370@news.povray.org>
Ok, I got it from your code... Thanks (Grin)... I just had to think a little
about what you posted. Like I said, I'm new so... Thanks again.


Post a reply to this message

From: NoOneEagle
Subject: Re: Smooth the corners in the intersection of two tubes
Date: 30 Jan 2011 12:25:00
Message: <web.4d459e34edc3acfcfbde73370@news.povray.org>
"NoOneEagle" <noo### [at] yahoocom> wrote:
> Ok, I got it from your code... Thanks (Grin)... I just had to think a little
> about what you posted. Like I said, I'm new so... Thanks again.

I can even change the rotation on the box and and can make other angles come
together also... This helps a great deal, thanks again.


Post a reply to this message

From: Stephen
Subject: Re: Smooth the corners in the intersection of two tubes
Date: 30 Jan 2011 12:29:35
Message: <4d459fff$1@news.povray.org>
On 30/01/2011 5:21 PM, NoOneEagle wrote:
> "NoOneEagle"<noo### [at] yahoocom>  wrote:
>> Ok, I got it from your code... Thanks (Grin)... I just had to think a little
>> about what you posted. Like I said, I'm new so... Thanks again.
>
> I can even change the rotation on the box and and can make other angles come
> together also... This helps a great deal, thanks again.
>
>
Great! We have all been new at one time. :-)

Here are a couple of hints:
Always create objects at the origin because when you rotate them they 
are rotated around the origin. So you rotate first then translate.

Materials and textures can be added to the objects or to the 
Union/Difference/Intersection. If you add them to the Union every object 
will be textured by the uppermost texture except for objects that have 
their own texture.


-- 
Regards
     Stephen


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Smooth the corners in the intersection of two tubes
Date: 31 Jan 2011 09:33:39
Message: <4d46c843$1@news.povray.org>
NoOneEagle wrote:
> Ok, I got it from your code... Thanks (Grin)... I just had to think a
> little about what you posted. Like I said, I'm new so... Thanks
> again.

Alternatively, if you want the corner to be rounded,
combine the tubes such that they meet at midpoint of
their end surfaces (leaving an empty wedge in the
corner) and add a sphere to fill it up.


Post a reply to this message

From: Stephen
Subject: Re: Smooth the corners in the intersection of two tubes
Date: 31 Jan 2011 10:40:54
Message: <4d46d806@news.povray.org>
On 31/01/2011 2:34 PM, Christian Froeschlin wrote:
> NoOneEagle wrote:
>> Ok, I got it from your code... Thanks (Grin)... I just had to think a
>> little about what you posted. Like I said, I'm new so... Thanks
>> again.
>
> Alternatively, if you want the corner to be rounded,
> combine the tubes such that they meet at midpoint of
> their end surfaces (leaving an empty wedge in the
> corner) and add a sphere to fill it up.

For more fun ;-)
Intersect a torus with a box so that only one quarter of the torus is 
visible. This will give you a rounded join like a bent pipe. (My values 

values.)


intersection {
  torus {
   0.750, 0.60
   rotate    <90.0, 0.0, 0.0>
   translate <0.720, 0.0, 0.0>
  }

  box {
   < -0.50,  -0.50,  -0.50 >,  < 0.50,  0.50,  0.50 >
   scale     <1.650, 1.650, 1.650>
   translate <-0.1080, 0.8270, 0.0>
  }

  texture{
   pigment { color rgb <1,0,0> }
   finish { phong 4.9}
  	}
  translate <0.030, 3.9980, 0.0>
}



-- 
Regards
     Stephen


Post a reply to this message

From: NoOneEagle
Subject: Re: Smooth the corners in the intersection of two tubes
Date: 7 Feb 2011 09:00:02
Message: <web.4d4ff9fbedc3acfc74bce4600@news.povray.org>
Thanks to all, (Grin) all the information you post here is invaluable...

I went to boxxes trying the same thing and I ran into a snag...


// camera position
camera {
  //location <5,-15,-20>
  location <0,0,-30>
  look_at <0,0,0>
}



// light
  light_source {<15,-15,40>
  color rgb <1,1,1>   }
  light_source {<-5,15,-40>
  color rgb <1,1,1>   }

//horizontal center
   difference {
//By using the 'difference' I want to weave the horizonal box underneath the
verticle box
//This works well when using 'tubes'
      box{
          < -6.0, -1.0, -1.00 >, < 6.0, 1.0, 1.00 >
          //scale     <.5,.5,.5>
          pigment { color rgbf <1,1,1,.0> }
      }

//center black out
      box{
          < -1.2, -1.0, -1.00 >, < 1.0, 1.0, 1.00 >
          //scale     <.5,.5,.5>
          //rotate    <0.0,0.0,0.0>
          translate <0.1,0.0,0.0>
      }
   }


//verticle center
      box{
          < -1.0, -7.0, -1.00 >, < 1.0, 7.0, 1.00 >
          //scale     <.5,.5,.5>
          pigment { color rgbf <1,1,1,.0> }

      }
//It works well to this point but if I add any other boxxes...

// if I add these boxes, then I loose the weave effect I had and a blacked out
box appears.
// Using tubes, this effect works but when I went to using boxes, I run across
this problem.
// I can't seem to find what I am doing wrong
/*
//verticle top left
      box{
          < -1.0, -0.0, -1.00 >, < 1.0, 6.0, 1.00 >
          //scale     <.5,.5,.5>
          translate <-5,1,0.0>
          pigment { color rgbf <1,1,1,.0> }
       }


//verticle bottom right
      box{
          < -1.0, -0.0, -1.00 >, < 1.0, 6.0, 1.00 >
          //scale     <.5,.5,.5>
          translate <5,1,0.0>
          pigment { color rgbf <1,1,1,.0> }
       }

*/


Post a reply to this message

Goto Latest 10 Messages Next 1 Messages >>>

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