POV-Ray : Newsgroups : povray.binaries.images : This is not a Rollex WATCH : Re: This is not a Rollex WATCH (no, it's a horn now) Server Time
4 Oct 2024 09:14:41 EDT (-0400)
  Re: This is not a Rollex WATCH (no, it's a horn now)  
From: Gilles Tran
Date: 27 Apr 1999 08:51:35
Message: <3725A543.FB0CBE44@inapg.inra.fr>
Thanks for the reference Ken, but my spline macro may be overkill for that. Also, the
macro doesn't modify the size of the extruded shape (no pointy end), and splines with
that kind of perfect mathematical shape are hard to figure out. Perhaps a little
"connect-the-dot" macro would do (not putting this in scenes-files because it's
really too small).  It's not perfect but you get the idea.
Gilles
#include "colors.inc"
camera{location  <1.0, 5, -30.0> direction 1.5*z right 4/3*x  look_at   <0.0, 5,
0.0>}
light_source{<-30, 30, -30> color Cyan} light_source{<30, 30, -30> color White*2}
#macro mHorn(hradius,hsize,hangle,n)
union{
#local lseg=pi*hsize/n;
#local i=1;
#local r1=hradius;
#local P1=<0,0,0>;
#local P2=<lseg,0,0>;
#while (i<=n)
        #local r2=hradius*(n-i)/n;
        cone{P1,r1,P2,r2} sphere{P1,r1}
        cone{P1,r1,P2,r2 scale <-1,1,1>} sphere{P1,r1 scale <-1,1,1>}
        #local P1=P2;
        #local P2=P1+lseg*(vnormalize(vrotate(P1,z*hangle*i/n)));
        #local r1=r2;
#local i=i+1;
#end
}
#end

object{mHorn(2,5,80,200) texture{pigment{rgb<1,0.7,0.3>} finish{metallic brilliance 5
ambient 0.01 phong 1}}}
background{White}



Ken wrote:

> Spider wrote:
> >
> > Hmm.. I have been trying to make a horn for some while, without any success at
> > all. i'll make some scans of the object I'm trying to create, and I'd like to
> > know a bit more of the procedure you used when you made yours.(yep, I know it's
> > a program, but I still want to know more:-)
>
>  The macro that Gilles offers for extruding along a path can easily
> produce horn shaped objects.
>
> http://www.mediaport.net/Artichaud/Tran/sources/gtsrcee.htm
>
> --
> Ken Tyler
>
> mailto://tylereng@pacbell.net


Post a reply to this message

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