POV-Ray : Newsgroups : povray.general : Tapering helix : Re: Tapering helix Server Time
29 Jul 2024 12:20:32 EDT (-0400)
  Re: Tapering helix  
From: Jim Holsenback
Date: 23 Jun 2011 13:34:40
Message: <4e037930@news.povray.org>
On 06/22/2011 02:42 PM, Le_Forgeron wrote:
> Le 21/06/2011 23:07, posfan12 nous fit lire :
>> I'd like to create a building shaped like a helix that tapers toward the top.
>> Can anyone come up with a good method? The helix macros in shapesq don't produce
>> the results I expect and they're not solid as far as I can tell.
>
> Do you mean a spiral along a cone ?
> Or a rotating square/whatever which get smaller on the top (dimension of
> side is reducing like the radius of the cone) ?
>
> (center of the square match the axis of the cone)
>
> you can try rotating a slice while increasing the angle and decreasing
> the size.
>
> // untested, 3.6/3.7
> union {
> #local Side=10;
> #local Max_Height=20;
> #local Step=0.1;
> #local Current=0;
> #local Turn=60; /* Degrees of rotation per vertical unit */
> #while (Current<  Max_Height)
> #local AA=<Side * (Max_Height - Current)/Max_Height, Current, Side *
> (Max_Height - Current)/Max_Height>;
> #local BB=<Side * (Max_Height - Current)/Max_Height, Current+Step, Side
> * (Max_Height - Current)/Max_Height>;
> box { AA*<-1,1,1>,BB rotate Turn*Current*y }
> #local Current=Current+Step;
> #end
> }
>
>
also works using sphere instead of box ... just called sphere with AA.x,BB.x

a little play with some of the parameters and it makes a cool shape 
(posted in images) :-)


Post a reply to this message

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