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