POV-Ray : Newsgroups : povray.newusers : Irregular cone scaling to bridge to curved edges? Server Time
30 Jul 2024 12:24:45 EDT (-0400)
  Irregular cone scaling to bridge to curved edges? (Message 1 to 10 of 12)  
Goto Latest 10 Messages Next 2 Messages >>>
From: Dave!
Subject: Irregular cone scaling to bridge to curved edges?
Date: 7 Oct 2004 12:00:00
Message: <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!


Post a reply to this message

From: Ross
Subject: Re: Irregular cone scaling to bridge to curved edges?
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

From: Dave!
Subject: Re: Irregular cone scaling to bridge to curved edges?
Date: 7 Oct 2004 13:50:00
Message: <web.416580aeb7d57f05f0000e6e0@news.povray.org>
"Ross" <rli### [at] everestkcnet> wrote:
> "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.

Hi Ross!
   Thanks for the input, but I think I wasn't clear in my request (it
appears that I deleted the introductory text before the code, go figure).

What I actually want to do is something like this:

cone {
<0,0,0>, 1 scale <1,1,1.5>
<0,1,0>, 1 scale <1,1,2.5>
}

I know that this isn't proper syntax, but I hope it illustrates what I'm
after.  The endcaps each have a different radius, but the scaling for the
two endcaps is different.  Can this be done?

Thanks again.

Dave!


Post a reply to this message

From: Ross
Subject: Re: Irregular cone scaling to bridge to curved edges?
Date: 7 Oct 2004 15:39:25
Message: <41659b6d$1@news.povray.org>
"Dave!" <orr### [at] no_spam_pleaseexcitecom> wrote in message
news:web.416580aeb7d57f05f0000e6e0@news.povray.org...

> Hi Ross!
>    Thanks for the input, but I think I wasn't clear in my request (it
> appears that I deleted the introductory text before the code, go figure).
>
> What I actually want to do is something like this:
>
> cone {
> <0,0,0>, 1 scale <1,1,1.5>
> <0,1,0>, 1 scale <1,1,2.5>
> }
>
> I know that this isn't proper syntax, but I hope it illustrates what I'm
> after.  The endcaps each have a different radius, but the scaling for the
> two endcaps is different.  Can this be done?
>
> Thanks again.
>
> Dave!
>
>

ah, i think i understand.

not with cone anyway since the radius isn't a vector value, just a float
value. i'll let someone else step in here and quietly back away from what
will probably be an Isosurface solution ;)

good luck!
-r


Post a reply to this message

From: Mike Williams
Subject: Re: Irregular cone scaling to bridge to curved edges?
Date: 7 Oct 2004 15:42:43
Message: <MPE$dDAJwZZBFwnA@econym.demon.co.uk>
Wasn't it Dave! who wrote:
>What I actually want to do is something like this:
>
>cone {
><0,0,0>, 1 scale <1,1,1.5>
><0,1,0>, 1 scale <1,1,2.5>
>}
>
>I know that this isn't proper syntax, but I hope it illustrates what I'm
>after.  The endcaps each have a different radius, but the scaling for the
>two endcaps is different.  Can this be done?

I think the proper syntax for that is 

#include "shapes.inc"
object{ Supercone(<0,0,0>, 1, 1.5 , <0,1,0>, 1 2.5)}

but I don't think that it actually achieves your objective.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Dave!
Subject: Re: Irregular cone scaling to bridge to curved edges?
Date: 7 Oct 2004 16:05:00
Message: <web.4165a0c9b7d57f05f0000e6e0@news.povray.org>
Mike Williams <nos### [at] econymdemoncouk> wrote:
> Wasn't it Dave! who wrote:
> >What I actually want to do is something like this:
> >
> >cone {
> ><0,0,0>, 1 scale <1,1,1.5>
> ><0,1,0>, 1 scale <1,1,2.5>
> >}
> >
> >I know that this isn't proper syntax, but I hope it illustrates what I'm
> >after.  The endcaps each have a different radius, but the scaling for the
> >two endcaps is different.  Can this be done?
>
> I think the proper syntax for that is
>
> #include "shapes.inc"
> object{ Supercone(<0,0,0>, 1, 1.5 , <0,1,0>, 1 2.5)}
>
> but I don't think that it actually achieves your objective.

Hmm--I'll mess around with it this evening.  Thanks to you both for your
insight.  I'll let you know how things turn out.

Is there a good online tutorial for isosurfaces?  I didn't have much luck
with the POV-Ray help docs.

Thanks again.

Dave!


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Irregular cone scaling to bridge to curved edges?
Date: 7 Oct 2004 20:16:29
Message: <4165dc5d$1@news.povray.org>
Dave! wrote:
...
> Is there a good online tutorial for isosurfaces?  I didn't have much luck
> with the POV-Ray help docs.

Yes, sure - here's one that Mike has made:

http://www.econym.demon.co.uk/isotut/


And here's an old one that Samuel once made:

http://www.zeropps.uklinux.net/isotut/


-- 
Tor Olav
http://subcube.net
http://subcube.com


Post a reply to this message

From: Mike Williams
Subject: Re: Irregular cone scaling to bridge to curved edges?
Date: 8 Oct 2004 00:00:06
Message: <kGMlfNAqbgZBFwSw@econym.demon.co.uk>
Wasn't it Dave! who wrote:
>Mike Williams <nos### [at] econymdemoncouk> wrote:
>> Wasn't it Dave! who wrote:
>> >What I actually want to do is something like this:
>> >
>> >cone {
>> ><0,0,0>, 1 scale <1,1,1.5>
>> ><0,1,0>, 1 scale <1,1,2.5>
>> >}
>> >
>> >I know that this isn't proper syntax, but I hope it illustrates what I'm
>> >after.  The endcaps each have a different radius, but the scaling for the
>> >two endcaps is different.  Can this be done?
>>
>> I think the proper syntax for that is
>>
>> #include "shapes.inc"
>> object{ Supercone(<0,0,0>, 1, 1.5 , <0,1,0>, 1 2.5)}
>>
>> but I don't think that it actually achieves your objective.
>
>Hmm--I'll mess around with it this evening.  Thanks to you both for your
>insight.  I'll let you know how things turn out.
>
>Is there a good online tutorial for isosurfaces?  I didn't have much luck
>with the POV-Ray help docs.

This was one of the rare occasions where I managed to resist immediately
suggesting an isosurface solution. Perhaps this bit of my isosurface
tutorial might help:

<http://www.econym.demon.co.uk/isotut/splines.htm#twolathe>

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Warp
Subject: Re: Irregular cone scaling to bridge to curved edges?
Date: 8 Oct 2004 05:25:43
Message: <41665d17@news.povray.org>
Dave! <orr### [at] no_spam_pleaseexcitecom> wrote:
> Is there a good online tutorial for isosurfaces?  I didn't have much luck
> with the POV-Ray help docs.

  A high-school-level math book can be the best isosurface tutorial.

  You can't make eg. the supercone shape unless you know your math.

  (It was actually me who developed the Supercone macro for inclusion
in POV-Ray. Even though an equivalent isosurface would have done the
job, I felt that I should make it a quartic because then I wouldn't
need to worry about max_gradients nor accuracies and it would always
render properly. Anyways, it was quite an interesting mathematical
exercise to develop the quartic vector.)

-- 
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}//  - Warp -


Post a reply to this message

From: Dave!
Subject: Re: Irregular cone scaling to bridge to curved edges?
Date: 8 Oct 2004 09:40:00
Message: <web.416697e0b7d57f05f0000e6e0@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> Dave! <orr### [at] no_spam_pleaseexcitecom> wrote:
> > Is there a good online tutorial for isosurfaces?  I didn't have much luck
> > with the POV-Ray help docs.
>
>   A high-school-level math book can be the best isosurface tutorial.
>
>   You can't make eg. the supercone shape unless you know your math.

Yeah, that's a bummer.  I've had to re-learn a lot of Trig that I never
thought I'd use.

>   (It was actually me who developed the Supercone macro for inclusion
> in POV-Ray. Even though an equivalent isosurface would have done the
> job, I felt that I should make it a quartic because then I wouldn't
> need to worry about max_gradients nor accuracies and it would always
> render properly. Anyways, it was quite an interesting mathematical
> exercise to develop the quartic vector.)

I played around with the macro last night, and it's really cool.  Thanks for
making that effort in the first place!

However, I sort of accidentally discovered that I could create the surface I
needed more easily through a matrix transformation of a simple cylinder.
I'll post a basic pic to the binaries group if anyone would care to look.

I'm grateful to everyone who offered insights!  It was only by working
through the suggestions that I finally hit on the answer.

Thanks again,

Dave!


Post a reply to this message

Goto Latest 10 Messages Next 2 Messages >>>

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