|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |