POV-Ray : Newsgroups : povray.general : Tapering helix Server Time
26 Nov 2024 05:54:33 EST (-0500)
  Tapering helix (Message 1 to 6 of 6)  
From: posfan12
Subject: Tapering helix
Date: 21 Jun 2011 17:10:00
Message: <web.4e010808b9860283662ad7fb0@news.povray.org>
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.


Mike


Post a reply to this message

From: Le Forgeron
Subject: Re: Tapering helix
Date: 22 Jun 2011 13:42:57
Message: <4e0229a1$1@news.povray.org>
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
}


Post a reply to this message

From: SharkD
Subject: Re: Tapering helix
Date: 22 Jun 2011 22:11:30
Message: <4e02a0d2$1@news.povray.org>
On 6/22/2011 1:42 PM, Le_Forgeron wrote:
> 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) ?

I looked for an image on Google, and this is the closest I found.

http://www.constructionphotography.com/ImageThumbs/A162-01067/3/A162-01067_Spiral_staircase_in_office_building.jpg

I want a shape like that, except tapering to a point toward the top. The 
storeys should each remain the same height though.


Mike


Post a reply to this message

From: Jim Holsenback
Subject: Re: Tapering helix
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

From: stbenge
Subject: Re: Tapering helix
Date: 25 Jun 2011 19:13:12
Message: <4e066b88@news.povray.org>
On 6/21/2011 2:07 PM, posfan12 wrote:
> 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.

There are a number of ways to achieve your goal.

1) Make a #while loop of objects to produce a helical shape
2) Make a helical mesh (most difficult)
3) Use a helical isosurfaces (easiest)

Number 3 is pretty easy, but will be the slowest to render. Of course 
you must know just what /kind/ of tapered helix you want.

~~~

Example 1: Helix with density change along y-axis

#include "functions.inc"

#declare DensityChange = 0.25; // rate of density change

isosurface{
   function{
     f_helix1(
       x,y,z,
       1,  // P0: number of helices
       6, // P1: period (number of turns)
       0.25,   // P2: minor radius
       0.75,  // P3: major radius
       1.0, // P4: shape parameter
       1,  // P5: cross section
       0.0// P6: cross section rotation angle
     )+y*DensityChange
   }
   accuracy .001
   max_gradient 1.494 /* found by looking at the message pane */
   contained_by{ box{<-2,-4,-2>,<2,3.9,2>} }
   pigment{rgb 1}
}

~~~

Example 2: Helix with scale change along y-axis (probably the one you 
wanted)

#include "functions.inc"

#declare TaperAmount = 0.5; // amount of y-axis tapering

isosurface{
   function{
     f_helix1(
       x/(TaperAmount*4-(y+4)*TaperAmount),
       (y+4)/(TaperAmount*4-(y+4)*TaperAmount)-4,
       z/(TaperAmount*4-(y+4)*TaperAmount),
       1,  // P0: number of helices
       2, // P1: period (number of turns)
       0.50,   // P2: minor radius
       0.75,  // P3: major radius
       1.0, // P4: shape parameter
       1,  // P5: cross section
       0.0// P6: cross section rotation angle
     )
   }
   accuracy .001
   max_gradient 100 /* could be much higher, could be much slower to 
render */
   contained_by{ box{<-2,-4,-2>,<2,-.1,2>} }
   pigment{rgb 1}
}

~~~

You should check out the isosurface tutorials available. Isosurfaces are 
easy to learn how to use. If you are somewhat dedicated, know or want to 
learn just how math interfaces with geometry, and have the time, then 
isosurfaces are definitely worth the effort :)

~Sam


Post a reply to this message

From: posfan12
Subject: Re: Tapering helix
Date: 26 Jun 2011 11:44:39
Message: <4e0753e7$1@news.povray.org>
On 6/25/2011 7:13 PM, stbenge wrote:
> On 6/21/2011 2:07 PM, posfan12 wrote:
>> 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.
>
> There are a number of ways to achieve your goal.
>
> 1) Make a #while loop of objects to produce a helical shape
> 2) Make a helical mesh (most difficult)
> 3) Use a helical isosurfaces (easiest)
>
> Number 3 is pretty easy, but will be the slowest to render. Of course
> you must know just what /kind/ of tapered helix you want.

I had thought of using a mesh. However I was hoping there were something 
that was easy *and* fast. #1 seems like it's kind of in the middle.


Mike


Post a reply to this message

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