POV-Ray : Newsgroups : povray.newusers : creating a tube Server Time
30 Jul 2024 22:18:35 EDT (-0400)
  creating a tube (Message 1 to 3 of 3)  
From: Tabea
Subject: creating a tube
Date: 23 Apr 2003 03:55:14
Message: <web.3ea6463e139c24052b26ab750@news.povray.org>
Hi,


except of a difference between two cylinders?



things that are allready exist.

Tabea

P.S. I love povray its hard to learn yes but why should i buy a prog for


Post a reply to this message

From: JWV
Subject: Re: creating a tube
Date: 23 Apr 2003 04:14:21
Message: <3ea64b5d@news.povray.org>
for as far as i know your methode of creating a tube is the only (usefull)
one. You could even make a macro for it :-).

//start of macro
#macro Tube (Lenght, Inner_Diam, Outer_Diam)
difference{
cylinder{<0,0,0>, <Lenght, 0,0>, Outer_Diam}
cylinder{<-1,0,0>, <Lenght+1, 0,0>, Inner_Diam}
}
#end
//end of macro

object{Tube(1, 2, 3) pigment {Red}} //shows a tube with lenght 1,
Inner_Diam 2, Outer_Diam 3 (and a red color)

"Tabea" <hio### [at] webde> wrote in message
news:web.3ea6463e139c24052b26ab750@news.povray.org...
> Hi,
>

> except of a difference between two cylinders?
>


> things that are allready exist.
>
> Tabea
>
> P.S. I love povray its hard to learn yes but why should i buy a prog for
> 2000? or more? Hope sometimes i make some nice pics.
>


Post a reply to this message

From: Christopher James Huff
Subject: Re: creating a tube
Date: 23 Apr 2003 17:30:10
Message: <cjameshuff-3BA150.17300423042003@netplex.aussie.org>
In article <web.3ea6463e139c24052b26ab750@news.povray.org>,
 "Tabea" <hio### [at] webde> wrote:


> except of a difference between two cylinders?

I'm not sure what you expect to be better. It is the most common way of 
doing it. You could generate a mesh or use a lathe, but why?




> things that are allready exist.

Well, they are well documented. Here's an example that does what you 
asked about:

#macro Tube(Start, End, IRad, ORad)
    #local Axis = vnormalize(End - Start);
    difference {
        cylinder {Start, End, ORad}
        cylinder {Start - Axis*0.001, End + Axis*0.001, IRad}
    }
#end

If you still have problems, you are going to need to be more specific.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

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