POV-Ray : Newsgroups : povray.newusers : Irregular cone scaling to bridge to curved edges? : Re: Irregular cone scaling to bridge to curved edges? Server Time
2 Nov 2024 03:16:58 EDT (-0400)
  Re: Irregular cone scaling to bridge to curved edges?  
From: Ross
Date: 7 Oct 2004 13:30:01
Message: <41657d19$1@news.povray.org>
"Dave!" <orr### [at] no_spam_pleaseexcitecom> wrote in message
news:web.41656793cf25c4f0f0000e6e0@news.povray.org...
> #declare elusiveobject = union {
>         box {<-40,24,0>,<40,-24,20>
>                 pigment {Red}}
>         cylinder {<-40,0,0>,<80,0,0>,1 open
>                 scale  <1,60,50>
>                 translate <0,24,30>
>                 clipped_by { plane { x 0
>                 rotate <0,0,-17.785>
>                 translate <40,24,0>}}
>                 clipped_by { plane { -x 0
>                 rotate <0,0,17.785>
>                 translate <-40,24,0>}}
>                 clipped_by {box {<-40,24,-20>,<40,-24,0>}}
>                 pigment {Blue}}
>         union {
>                 disc {<40,0,0>,<1,0,0>,1}
>                 disc {<-40,0,0>,<1,0,0>,1}
>                         scale <1,40,50>
>                         translate <0,24,30>
>                         clipped_by {box {<-40.1,24,-20.1>,<40.1,-24,0>}}
>                         pigment {Yellow}}
>               }
>
> Forgive me if the code isn't as elegant as it could be!
> I'm trying to create a smooth, curved surface linking the top edge of the
> Yellow disc to the near edge of the Blue cylinder.  I can almost get it,
> but not quite.  The shape I'm looking for seems to be a cylinder with
> different scaling of the two endcaps, but I can't figure out how to do
> that.
>
> Can someone propose a way to achieve what I'm aiming for here?  If
possible,
> I'd prefer to do it with basic shapes rather than patches or splines, but
> I'll be grateful for any suggestions.
>
> If the answer is ridiculously simple, please be gentle!
>
> Thanks in advance for any help!
>
> Dave!
>
>
>

your subject has it almost. you use a cone with a different radus for each
end:

cone {
 <0, 0, 0>, 0.25
 <0, 1, 0>, 0.75
}

or something to that effect if I understand your intentions. for more info
about cones, see 3.3.1.3 in the docs.


Post a reply to this message

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