POV-Ray : Newsgroups : povray.newusers : Problem with the simplest shapes : Re: Problem with the simplest shapes Server Time
29 Jul 2024 22:22:44 EDT (-0400)
  Re: Problem with the simplest shapes  
From: Jim Charter
Date: 4 Feb 2005 17:21:25
Message: <4203f565$1@news.povray.org>
jkVogel wrote:
> I'm making a bottle. It looks like glass of course. And I have a problem -
> the part of the bottle between its wide and narrow cylinders (actually
> difference of two cones) looks like very strange. It seems to be not
> transparent at all. In addition its color is blue while the color of bottle
> is gray. Whats my fault?
> The code of the bottle:
> 
> union {
>   difference {
>     cylinder {
>       <0, 0, 0>, <0, 2, 0>, 0.5
>     }
>     cylinder {
>       <0, 0.1, 0>, <0, 2.1, 0>, 0.45
>     }
>   }
> // problem place starts...
>   difference {
>     cone {
>       <0, 2, 0>, 0.5, <0, 2.5, 0>, 0.2
>     }
>     cone {
>       <0, 1.9, 0>, 0.51, <0, 2.6, 0>, 0.09
>     }
>   }
> // ... ends
>   difference {
>     cylinder {
>       <0, 2.5, 0>, <0, 3, 0>, 0.2
>     }
>     cylinder {
>       <0, 2.4, 0>, <0, 3.1, 0>, 0.15
>     }
>   }
>   texture {
>     pigment {
>     color rgbf <0.95, 0.95, 0.95, 0.92>
>     }
>     finish {
>       ambient 0.05
>       diffuse 0.05
>       reflection 0.2
>       specular 0.2
>       roughness 0.005
>     }
>   }
>   interior {
>     ior 1.5
>   }
>   translate <-1, 1, 0.5>
> }
> 
> 
Without texting I notice two things:

Use merge instead of union with transparent csg

and the cones difference looks a little inside out

maybe use:
    difference {
      cone {
        <0, 2, 0>, 0.5, <0, 2.5, 0>, 0.2

      }
      cone {
        <0, 1.99, 0>, 0.45, <0, 2.51, 0>, 0.15

      }
    }


Post a reply to this message

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