POV-Ray : Newsgroups : povray.newusers : cylinder walls : Re: cylinder walls Server Time
5 Oct 2024 16:21:58 EDT (-0400)
  Re: cylinder walls  
From: clipka
Date: 26 Aug 2009 05:47:39
Message: <4a9504bb@news.povray.org>
tiocfaidh schrieb:
> How could I create a hollow cylinder but with thicker walls?

You need to cut a hole into a solid cylinder using CSG:

difference {
   #local Dir = vnormalize(B-A);
   cylinder { A,B,Radius }
   cylinder { A+Dir*Thickness,B-Dir*Thickness,Radius-Thickness }
}

where A and B are center coordinates of the top and bottom, 
respectively, and Radius and Thickness are the outer cylinder radius and 
the thickness of the cylinder, respectively.

This will create an airtight hollow cylinder. To have open ends, instead 
use:

difference {
   #local Dir = vnormalize(B-A);
   cylinder { A,B,Radius }
   cylinder { A-Dir*0.01,B+Dir*0.01,Radius-Thickness }
}


Post a reply to this message

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