![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
I was wondering if it was possible to make, say, a hexagon from an
isosurface. I can't seem to figure out a good way to make anything but
cubic objects. No matter how complex an object may seem , deep down it
is within cubic guidelines. Is there any way to make objects that use
the 360 degree model, to make seven-sided and higher polygons? If not,
can it be implemented in future versions of the isosurface? Thanks in
advance.
--
Samuel Benge
E-Mail: STB### [at] aol com
Visit the still unfinished isosurface tutorial:
http://members.aol.com/stbenge
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
In article <3851D4A6.B814D927@aol.com>, "SamuelT." <STB### [at] aol com>
wrote:
> I was wondering if it was possible to make, say, a hexagon from an
> isosurface. I can't seem to figure out a good way to make anything but
> cubic objects. No matter how complex an object may seem , deep down it
> is within cubic guidelines. Is there any way to make objects that use
> the 360 degree model, to make seven-sided and higher polygons? If not,
> can it be implemented in future versions of the isosurface? Thanks in
> advance.
It is definitely possible. Look at the trig functions for the
isosurface, you can do just about anything with them.
//Makes a hexagonal prism, the angles given to the trig functions
//are the angles of the sides
isosurface {
function {
(z*sin(radians(0)) + x*cos(radians(0)) - 1)
&(z*sin(radians(60)) + x*cos(radians(60)) - 1)
&(z*sin(radians(120)) + x*cos(radians(120)) - 1)
&(z*sin(radians(180)) + x*cos(radians(180)) - 1)
&(z*sin(radians(240)) + x*cos(radians(240)) - 1)
&(z*sin(radians(300)) + x*cos(radians(300)) - 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) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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.
Chris Huff wrote:
> In article <3851D4A6.B814D927@aol.com>, "SamuelT." <STB### [at] aol com>
> wrote:
>
> > I was wondering if it was possible to make, say, a hexagon from an
> > isosurface. I can't seem to figure out a good way to make anything but
> > cubic objects. No matter how complex an object may seem , deep down it
> > is within cubic guidelines. Is there any way to make objects that use
> > the 360 degree model, to make seven-sided and higher polygons? If not,
> > can it be implemented in future versions of the isosurface? Thanks in
> > advance.
>
> It is definitely possible. Look at the trig functions for the
> isosurface, you can do just about anything with them.
>
> //Makes a hexagonal prism, the angles given to the trig functions
> //are the angles of the sides
> isosurface {
> function {
> (z*sin(radians(0)) + x*cos(radians(0)) - 1)
> &(z*sin(radians(60)) + x*cos(radians(60)) - 1)
> &(z*sin(radians(120)) + x*cos(radians(120)) - 1)
> &(z*sin(radians(180)) + x*cos(radians(180)) - 1)
> &(z*sin(radians(240)) + x*cos(radians(240)) - 1)
> &(z*sin(radians(300)) + x*cos(radians(300)) - 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/
--
Samuel Benge
E-Mail: STB### [at] aol com
Visit the still unfinished isosurface tutorial:
http://members.aol.com/stbenge
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
It appears my version of the superpatch doesn't know what 'radians' is. Off
I go now to download the megapatch, hoping it supports radians....
Chris Huff wrote:
> In article <3851D4A6.B814D927@aol.com>, "SamuelT." <STB### [at] aol com>
> wrote:
>
>
>
> It is definitely possible. Look at the trig functions for the
> isosurface, you can do just about anything with them.
>
>
--
Samuel Benge
E-Mail: STB### [at] aol com
Visit the still unfinished isosurface tutorial:
http://members.aol.com/stbenge
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/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) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
In article <3852A45F.401732A2@aol.com>, "SamuelT." <STB### [at] aol com>
wrote:
> It appears my version of the superpatch doesn't know what 'radians' is.
> Off
> I go now to download the megapatch, hoping it supports radians....
I am pretty certain it does, since it includes the MultiPatch, which is
what I used on this.
You can replace the calls to radians like this:
radians(D)
can be replaced with:
D*pi/180
Actually, as I remember, the Superpatch doesn't recognize "pi" either.
That is another thing the Multipatch adds, and which should be in the
Megapatch. You can work around this by adding
#declare PI = pi;
and using "PI" in place of "pi".
D*PI/180
--
Chris Huff
e-mail: chr### [at] yahoo com
Web page: http://chrishuff.dhs.org/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
I have the multipatch now and it works fine (but slow). I'm glad to see pi in
there, since I use it a lot.
Chris Huff wrote:
> In article <3852A45F.401732A2@aol.com>, "SamuelT." <STB### [at] aol com>
> wrote:
>
> > It appears my version of the superpatch doesn't know what 'radians' is.
> > Off
> > I go now to download the megapatch, hoping it supports radians....
>
> I am pretty certain it does, since it includes the MultiPatch, which is
> what I used on this.
> You can replace the calls to radians like this:
> radians(D)
> can be replaced with:
> D*pi/180
>
> Actually, as I remember, the Superpatch doesn't recognize "pi" either.
> That is another thing the Multipatch adds, and which should be in the
> Megapatch. You can work around this by adding
> #declare PI = pi;
> and using "PI" in place of "pi".
> D*PI/180
>
> --
> Chris Huff
> e-mail: chr### [at] yahoo com
> Web page: http://chrishuff.dhs.org/
--
Samuel Benge
E-Mail: STB### [at] aol com
Visit the still unfinished isosurface tutorial:
http://members.aol.com/stbenge
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Actually, I was able to encase the first three parts in abs( ) functions to
shorten it. The remaining three were deleted. It worked well, but I don't think
it helped the rendering time, only my editor space :)
Chris Huff wrote:
> 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/
--
Samuel Benge
E-Mail: STB### [at] aol com
Visit the still unfinished isosurface tutorial: http://members.aol.com/stbenge
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
In article <3852B1D6.EBABC753@aol.com>, "SamuelT." <STB### [at] aol com>
wrote:
> Actually, I was able to encase the first three parts in abs( ) functions
> to
> shorten it. The remaining three were deleted. It worked well, but I don't
> think
> it helped the rendering time, only my editor space :)
Well, my first version used abs() functions and was shorter by 3 lines,
but this only works for prisms with an even number of sides.
--
Chris Huff
e-mail: chr### [at] yahoo com
Web page: http://chrishuff.dhs.org/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Yeah, I can see it not working for a 7-sided object.
Chris Huff wrote:
> In article <3852B1D6.EBABC753@aol.com>, "SamuelT." <STB### [at] aol com>
> wrote:
>
> > Actually, I was able to encase the first three parts in abs( ) functions
> > to
> > shorten it. The remaining three were deleted. It worked well, but I don't
> > think
> > it helped the rendering time, only my editor space :)
>
> Well, my first version used abs() functions and was shorter by 3 lines,
> but this only works for prisms with an even number of sides.
>
> --
> Chris Huff
> e-mail: chr### [at] yahoo com
> Web page: http://chrishuff.dhs.org/
--
Samuel Benge
E-Mail: STB### [at] aol com
Visit the still unfinished isosurface tutorial: http://members.aol.com/stbenge
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |