POV-Ray : Newsgroups : povray.newusers : cylinder walls : Re: cylinder walls Server Time
5 Oct 2024 16:00:10 EDT (-0400)
  Re: cylinder walls  
From: Tim Attwood
Date: 27 Aug 2009 19:34:36
Message: <4a97180c$1@news.povray.org>
> How could I create a hollow cylinder but with thicker walls?

#macro Pipe(P1, P2, r1, r2)   
  #local _P3 = P1 - 0.1*(P2-P1); // V1 - 0.1*V2
  #local _P4 = P1 + 1.1*(P2-P1); // V1 + 1.1*V2
  difference {
    cylinder {P1,P2,r1}
    cylinder {_P3,_P4,r2}
  }
#end

// example 
Pipe(<0,0,0>,<0,1,0>,0.5,0.45)


Post a reply to this message

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