POV-Ray : Newsgroups : povray.advanced-users : Make a Pipe Server Time
23 Nov 2024 15:59:40 EST (-0500)
  Make a Pipe (Message 1 to 6 of 6)  
From: bakom
Subject: Make a Pipe
Date: 29 Jul 2015 23:40:01
Message: <web.55b99b6a5d7be2a78ba51da30@news.povray.org>
I want to make a pipe with any number of points, say starting point then more
than one points. These points are having different radiuses i.e. inner radius
and outer radius. I just make a macro for it with only two points.

#include "functions.inc"
#include "textures.inc"
#include "colors.inc"

camera { location  <0, 400, 400> look_at <0, 0, 0> angle 15}

light_source {<10,60,-10> colour rgb 1}
light_source {<10,60,10> colour rgb 1}
light_source {<10,-60,-10> colour rgb 1}
light_source {<-10,-60,10> colour rgb 1}

#macro Pipe(p1, p2, r1, r2, r3, r4)
  difference
  {
    cone {p1, r1, p2, r3 hollow on}
    cone {p1, r2, p2, r4 } hollow off
   texture{ pigment{ rgb 0.9}}
  }
#end

object{
Pipe(<0, 0, 0>, <0, 30, 0>, 20, 10, 40, 20)
hollow on
}


As we know the inner part of pipe is hollow but I'm not able to make this pipe
hollow. Whats wrong in it?
Also how I modify this macro so that I can make a long pipe with different
points i.e. more that two points for it( may be with different radiuses ).
Waiting for reply.


Post a reply to this message

From: Le Forgeron
Subject: Re: Make a Pipe
Date: 30 Jul 2015 01:14:51
Message: <55b9b2cb$1@news.povray.org>
Le 30/07/2015 05:36, bakom a écrit :
> I want to make a pipe with any number of points, say starting point then more
> than one points. These points are having different radiuses i.e. inner radius
> and outer radius. I just make a macro for it with only two points.
>
> #include "functions.inc"
> #include "textures.inc"
> #include "colors.inc"
>
> camera { location  <0, 400, 400> look_at <0, 0, 0> angle 15}
>
> light_source {<10,60,-10> colour rgb 1}
> light_source {<10,60,10> colour rgb 1}
> light_source {<10,-60,-10> colour rgb 1}
> light_source {<-10,-60,10> colour rgb 1}
>
> #macro Pipe(p1, p2, r1, r2, r3, r4)
>    difference
>    {
>      cone {p1, r1, p2, r3 hollow on}
>      cone {p1, r2, p2, r4 } hollow off
>     texture{ pigment{ rgb 0.9}}
>    }
> #end
>
> object{
> Pipe(<0, 0, 0>, <0, 30, 0>, 20, 10, 40, 20)
> hollow on
> }
>
>
> As we know the inner part of pipe is hollow but I'm not able to make this pipe
> hollow. Whats wrong in it?
> Also how I modify this macro so that I can make a long pipe with different
> points i.e. more that two points for it( may be with different radiuses ).
> Waiting for reply.
>

Hollow is related to media, in your situation it is useless so far.

you also have a problem of coincident surface, which might still show 
the cap of the first cone. I would suggest using the "open" modifier on 
the first cone, but then there would be no cap at all for the 
difference. So that's not the solution.

Do you have to "see" the inside ? If not, you should have a look at 
sphere_sweep object (cut with some rotated box at each end, so still a 
difference)

If yes, a difference of sphere_sweep and 2 rotated box (one at each end) 
would be my easy to write solution (it might crawl to render), passing 
the points and radius as either arrays (vector can be 5D, so you are 
fine with a single arrays of vector), or as a spline (but that would be 
with my own derivative of povray or megapov, so as to get access to the 
spline definition points inside the macro)


Post a reply to this message

From: Cousin Ricky
Subject: Re: Make a Pipe
Date: 30 Jul 2015 01:18:27
Message: <55b9b3a3@news.povray.org>
On 2015-07-29 11:36 PM (-4), bakom wrote:
> #macro Pipe(p1, p2, r1, r2, r3, r4)
>    difference
>    {
>      cone {p1, r1, p2, r3 hollow on}
>      cone {p1, r2, p2, r4 } hollow off
>     texture{ pigment{ rgb 0.9}}
>    }
> #end

First of all, the hollow keyword is totally irrelevant to your problem. 
  The hollow keyword is for allowing media inside transparent objects, 
not for making hollow shapes.

At first glance, it appears your problem is coincident surfaces.  The 
ends of the inner pipe are in exactly the same planes as the ends of the 
outer pipe.

http://wiki.povray.org/content/Documentation:Tutorial_Section_2.1#Co-incident_Surfaces


Post a reply to this message

From: Cousin Ricky
Subject: Re: Make a Pipe
Date: 30 Jul 2015 01:22:25
Message: <55b9b491@news.povray.org>
On 2015-07-30 01:19 AM (-4), Cousin Ricky wrote:
> At first glance, it appears your problem is coincident surfaces.  The
> ends of the inner pipe are in exactly the same planes as the ends of the
> outer pipe.

That should read inner CONE and outer CONE.  (I shouldn't be responding 
to questions after being awakened from a sound sleep.)


Post a reply to this message

From: MichaelJF
Subject: Re: Make a Pipe
Date: 30 Jul 2015 01:25:02
Message: <web.55b9b497ea59b4ba6216c5d50@news.povray.org>
> Also how I modify this macro so that I can make a long pipe with different
> points i.e. more that two points for it( may be with different radiuses ).
> Waiting for reply.


You may be interested in:

http://www.oyonale.com/modeles.php?lang=en&page=20

Best regards,
Michael


Post a reply to this message

From: bakom
Subject: Re: Make a Pipe
Date: 30 Jul 2015 02:20:00
Message: <web.55b9c126ea59b4ba8ba51da30@news.povray.org>
Cousin Ricky <ric### [at] yahoocom> wrote:
> On 2015-07-29 11:36 PM (-4), bakom wrote:
> > #macro Pipe(p1, p2, r1, r2, r3, r4)
> >    difference
> >    {
> >      cone {p1, r1, p2, r3 hollow on}
> >      cone {p1, r2, p2, r4 } hollow off
> >     texture{ pigment{ rgb 0.9}}
> >    }
> > #end
>
> First of all, the hollow keyword is totally irrelevant to your problem.
>   The hollow keyword is for allowing media inside transparent objects,
> not for making hollow shapes.
>
> At first glance, it appears your problem is coincident surfaces.  The
> ends of the inner pipe are in exactly the same planes as the ends of the
> outer pipe.
>
>
http://wiki.povray.org/content/Documentation:Tutorial_Section_2.1#Co-incident_Surfaces

Thanks for reply also to Le Forgeron.
Ok, so can you please rewrite or gave me a macro for it?


--
Gurwinder Singh


Post a reply to this message

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