|
![](/i/fill.gif) |
In article <38529FAA.9A53DEA1@aol.com>, "SamuelT." <STB### [at] aol com>
wrote:
> Cool! Thanks Chris! I'll get started on this stuff soon and might post my
> progress at the images section. The only drawback about this, is that the
> parser might get "bored" like it has in the past when using large
> functions.
Well, much of the code is duplicated, you could separate it into a
separate function to make it considerably shorter, something like this:
//Makes one side of prism aligned in xz plane
//Syntax is: PrismSide(angle, x, z) - distance
#declare PrismSide =
function {
z*sin(radians(x)) + y*cos(radians(x))
}
//Makes a hexagonal prism, the angles given
//are the angles of the sides to each other
isosurface {
function {
PrismSide(0, x, y) - 1)
&PrismSide(60, x, y) - 1)
&PrismSide(120, x, y) - 1)
&PrismSide(180, x, y) - 1)
&PrismSide(240, x, y) - 1)
&PrismSide(300, x, y) - 1)
&(abs(y) - 1)
}
threshold 0
clipped_by{box {<-5, -5, -15>, < 5, 5, 5>}}
accuracy 0.001
texture {ComYw}
}
--
Chris Huff
e-mail: chr### [at] yahoo com
Web page: http://chrishuff.dhs.org/
Post a reply to this message
|
![](/i/fill.gif) |