POV-Ray : Newsgroups : povray.newusers : cylinder walls : Re: cylinder walls Server Time
5 Oct 2024 15:48:53 EDT (-0400)
  Re: cylinder walls  
From: clipka
Date: 26 Aug 2009 07:31:16
Message: <4a951d04$1@news.povray.org>
tiocfaidh schrieb:
> could you show me a small example, im trying to play around with the variables
> but its not working, get a huge shape

Make sure to use vectors for A and B.

For instance:

   #local A = <0,0,0>;
   #local B = <0,2,0>;
   #local Radius = 0.8;
   #local Thickness = 0.2;
   difference {
     #local Dir = vnormalize(B-A);
     cylinder { A,B,Radius }
     cylinder { A-Dir*0.01,B+Dir*0.01,Radius-Thickness }
   }

or, with all the math already worked out and hard-coded:

   difference {
     cylinder { <0,0,0>, <0,2,0>, 0.8 }
     cylinder { <0,-0.02,0>, <0,2.02,0>, 0.6 }
   }


Post a reply to this message

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