POV-Ray : Newsgroups : povray.general : Joining cylinders with a miter-join : Re: Joining cylinders with a miter-join Server Time
31 Jul 2024 20:22:22 EDT (-0400)
  Re: Joining cylinders with a miter-join  
From: Lukas Winter
Date: 23 Dec 2006 06:38:22
Message: <pan.2006.12.23.11.38.21.773783@removeit.geloescht.net>
Am Fri, 22 Dec 2006 02:40:25 -0500 schrieb Nicolas George:

> Hi.
> 
> I often wonder how to make cylinders joining with a miter-join, that is:
> 
> ------------+
>            /|
>           / |
>          /  |
> --------+   |
>         |   |
>         |   |
>         |   |
>         |   |
> The solution that comes to mind immediately is to use something like:
> 
> union {
>   intersection {
>     cylinder { horizontal }
>     plane { diagonal, interior up }
>   }
>   intersection {
>     cylinder { vertical }
>     plane { diagonal, interior down }
>   }
>   }
> }
> But it leads to coincident surfaces. Making the cylinders overlap is not
> good either, because near the point of the angle, the biggest cylinder is
> the wrong one.
> 
> Any suggestion?

What about:
merge
{
  intersection
  {
    merge
    {
      cylinder
      {
        <-2, 0, 0>, <.5, 0, 0>, .5
      }
      plane
      {
        -x+y, 0
      }
    }
    cylinder
    {
      <0, .5, 0>, <0, -1, 0>, .5
    }
  }
  cylinder
  {
    <-2, 0, 0>, <0, 0, 0>, .5
  }
  pigment
  {
    rgbf <1, 0, 0, .7>
  }
}

I don't know if this works with different radii, but there are no problems
with coincident surfaces.
Lukas Winter


Post a reply to this message

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