POV-Ray : Newsgroups : povray.advanced-users : Spiralled object with a decreasing radius : Re: Spiralled object with a decreasing radius Server Time
8 Jul 2024 18:54:51 EDT (-0400)
  Re: Spiralled object with a decreasing radius  
From: Mock26
Date: 23 Apr 2007 21:05:02
Message: <web.462d57a72acc8fd87a0e9df90@news.povray.org>
"Charles C" <nomail@nomail> wrote:
> "Mock26" <nomail@nomail> wrote:
> > I would first like to thank Julius Klatte for posting some spiral tutorials
> > on his website (http://members.tripod.com/~klatte/pov/helix.html).  All
> > credit for the following information belongs to him.
> >
> > His basic tutorial is as follows:
> >
> > camera { location <0,2,-10> look_at <0,0,0> }
> > light_source { <-30,40,-50> rgb 1 }
> > light_source { <60,20,-30> rgb 1 }
> >
> > #declare Tex = texture { pigment { color rgb <0.95,0.65,0.55> } finish {
> > phong 1 phong_size 100 } }
> > #declare S = sphere { 0, 0.25 texture { Tex } }
> >
> > #declare Precision = 0.5;
> > union {
> >   #declare T = 0;
> >   #while (T<360)
> >     object { S translate <0,T/180,-2> rotate 4*y*T }
> >     #local T = T + 1/Precision;
> >   #end
> > rotate x*-20 }
> >
> >
> >
> > Now, my question is, "Is there is any way to cause each subsequent sphere to
> > have a smaller or larger diameter than the one before it?"
> >
> > Unfortunately, I'm only just dabbling with macro's and such and I'm not all
> > that good at it.  I can understand this macro only because Julius Klatte
> > explains it very well and "breaking it down" backwards isn't that hard for
> > me.  However, trying to create my own macro, even using his as a guide, is
> > a bit beyond me at the moment.  I appreciate any help that anyone can offer
> > on this, especially if it is in the form of a macro that I can copy and
> > paste into my POV file!  Thanks!
> >
> >
> > Take care and have a great day....
> >
> >
> >
> > ciao,
> > john.
>
>
> Yes.  Right now you're translating it using the changing variable T.  All
> you need to do is also scale it by something that changes with T.  Just
> make sure you scale before you translate or the scale will affect the
> position of the sphere as well.   E.g:
> >     object { S scale 1.5-T/360 translate <0,T/180,-2> rotate 4*y*T }
>
> or whatever numbers look good.
>
> Charles

Woot!

Thanks, Charles!  I was messing around with scale, but I just didn't know
the correct formula for it.  Thanks again!


Take care and have a great day....



ciao,
john.


Post a reply to this message

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