![](/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) |
Hi,
Just another experiment, posted because I have a couple of questions.
a) The code for each isosurface is:
#declare F = function { pigment { crackle form <1,0,0> color_map { [0.0 rgb
0.0 ] [1.0 rgb 1 ] } scale 1/2 }}
#declare Gloop=
isosurface{
function { x^2+y^3+z^2+F-1 }
contained_by{ box { -2.1, 2.1 } }
max_gradient 14
accuracy 0.001
}
I notice that one of the isos has a strange line on its base. How would I
get rid of this? I already changed accuracy and max_gradient, and got rid of
many more errors, but the rendering takes too long on my p200.
b) Any idea how I could make the floor using one isosurface, rather than a
grid of many isosurfaces, as I have done here?
Thanks all,
Andy Cocker
---------------------------------------------------------------
www.mariner9.net
..... for my music and graphics.
---------------------------------------------------------------
'I spilled spot remover on my dog. He's gone now. '
'I went to a restaurant that serves "breakfast at any time."
So I ordered french toast during the Renaissance. '
- Steven Wright.
Post a reply to this message
Attachments:
Download 'hhhh.jpg' (47 KB)
Preview of image 'hhhh.jpg'
![hhhh.jpg](/povray.binaries.images/attachment/%3C3a0c2754%40news.povray.org%3E/hhhh.jpg?preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Wasn't it Andy Cocker who wrote:
>Hi,
>
>Just another experiment, posted because I have a couple of questions.
>
>a) The code for each isosurface is:
>#declare F = function { pigment { crackle form <1,0,0> color_map { [0.0 rgb
>0.0 ] [1.0 rgb 1 ] } scale 1/2 }}
>
>#declare Gloop=
> isosurface{
> function { x^2+y^3+z^2+F-1 }
> contained_by{ box { -2.1, 2.1 } }
> max_gradient 14
> accuracy 0.001
>}
>
>I notice that one of the isos has a strange line on its base. How would I
>get rid of this? I already changed accuracy and max_gradient, and got rid of
>many more errors, but the rendering takes too long on my p200.
I don't know how to fix the line (I can't reproduce it) but I can speed
it up by a factor of more than 2.
The trick is to notice that isosurfaces can render faster when the
contained_by surface is a reasonably close fit, and can render slowly if
the fit is loose. I guess that's partly because the code starts from the
point where the ray intersects the contained_by shape and then starts
hunting up and down the ray looking for the actual surface.
In this case, your Gloop shape doesn't fit at all neatly into a single
box or a single sphere, but we can cut it up into two pieces, each of
which fit reasonably neatly into smaller boxes.
There are a couple of side effects. Firstly we have to bump up the
accuracy, otherwise the join becomes visible (the slight speed penalty
caused by increasing the accuracy is insignificant compared to the time
saved). Secondly, the max_gradients of the pieces are lower than that of
the original isosurface, presumably the high gradient areas were in the
upper corners of the original contained_by box.
It may even happen that the significant increase in accuracy that you
can now use, in half the rendering time, might possibly get rid of the
strange line.
#declare F = function { pigment { crackle form <1,0,0> color_map { [0.0
rgb 0.0 ] [1.0 rgb 1 ] } scale 1/2 }}
#declare Gloop2=
union {
isosurface{
function { x^2+y^3+z^2+F-1 }
contained_by{ box { -1, 1 } }
max_gradient 6
accuracy 0.000001
}
isosurface{
function { x^2+y^3+z^2+F-1 }
contained_by{ box { -2.1, <2.1,-0.8,2.1> } }
max_gradient 12
accuracy 0.000001
}
}
--
Mike Williams
Gentleman of Leisure
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) |
Wow Mike, what can I say? Thankyou so much.
All the best,
Andy Cocker
"Mike Williams" <mik### [at] nospam please> wrote in message
news:+cWYoAAcCHD6Ew+f### [at] econym demon co uk...
>
> I don't know how to fix the line (I can't reproduce it) but I can speed
> it up by a factor of more than 2.
>
> The trick is to notice that isosurfaces can render faster when the
> contained_by surface is a reasonably close fit, and can render slowly if
> the fit is loose. I guess that's partly because the code starts from the
> point where the ray intersects the contained_by shape and then starts
> hunting up and down the ray looking for the actual surface.
>
> In this case, your Gloop shape doesn't fit at all neatly into a single
> box or a single sphere, but we can cut it up into two pieces, each of
> which fit reasonably neatly into smaller boxes.
>
> There are a couple of side effects. Firstly we have to bump up the
> accuracy, otherwise the join becomes visible (the slight speed penalty
> caused by increasing the accuracy is insignificant compared to the time
> saved). Secondly, the max_gradients of the pieces are lower than that of
> the original isosurface, presumably the high gradient areas were in the
> upper corners of the original contained_by box.
>
> It may even happen that the significant increase in accuracy that you
> can now use, in half the rendering time, might possibly get rid of the
> strange line.
>
> #declare F = function { pigment { crackle form <1,0,0> color_map { [0.0
> rgb 0.0 ] [1.0 rgb 1 ] } scale 1/2 }}
>
> #declare Gloop2=
> union {
> isosurface{
> function { x^2+y^3+z^2+F-1 }
> contained_by{ box { -1, 1 } }
> max_gradient 6
> accuracy 0.000001
> }
> isosurface{
> function { x^2+y^3+z^2+F-1 }
> contained_by{ box { -2.1, <2.1,-0.8,2.1> } }
> max_gradient 12
> accuracy 0.000001
> }
> }
>
> --
> Mike Williams
> Gentleman of Leisure
--
---------------------------------------------------------------
www.mariner9.net
..... for my music and graphics.
---------------------------------------------------------------
'I spilled spot remover on my dog. He's gone now. '
'I went to a restaurant that serves "breakfast at any time."
So I ordered french toast during the Renaissance. '
- Steven Wright.
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) |
Andy Cocker wrote:
>...
Snip --- 8< ---
> b) Any idea how I could make the floor using one isosurface, rather than a
> grid of many isosurfaces, as I have done here?
>...
I hope the code below solves this problem.
Experiment with the Xnr and Znr values (integers) to see how these
works. (Also see attached image.)
I think that it's possible to construct a "ReplikateFunction" that
also can generate grids of isosurfaces with an even number of "parts"
along each side.
Btw.:
You have a nice scene with interesting functions and patterns !
Regards,
Tor Olav
--
mailto:tor### [at] hotmail com
http://www.crosswinds.net/~tok/tokrays.html
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
#version unofficial MegaPov 0.5;
#include "colors.inc"
global_settings { ambient_light color White }
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
$ CM = color_map { [ 0 rgb 0 ] [ 1 rgb 1 ] }
$ CrackleFunction =
function { pigment { crackle form <1, 0, 0> color_map { CM } } }
$ OtherFunction = function { x^2 + y^3 + z^2 }
$ Xspacing = 5;
$ Zspacing = 4;
$ ReplicateFunction =
function {
OtherFunction(
(x + if(x, 1, -1)*Xspacing/2) % Xspacing - if(x, 1, -1)*Xspacing/2,
y,
(z + if(z, 1, -1)*Zspacing/2) % Zspacing - if(z, 1, -1)*Zspacing/2
)
}
$ Xnr = 3;
$ Znr = 2;
$ Gloop =
isosurface {
function {
ReplicateFunction(x, y, z)
+CrackleFunction(x*2, y*2, z*2)
-1
}
contained_by {
box {
-(<Xnr, 3.5, Znr> - <1, 0, 1>/2)*<Xspacing, 1, Zspacing>,
(<Xnr, 1.0, Znr> - <1, 0, 1>/2)*<Xspacing, 1, Zspacing>
}
}
max_gradient 6
accuracy 1E-6
}
object {
Gloop
pigment {
gradient 6*y
turbulence 0.5
color_map {
[ 0.0 color Blue + White ]
[ 0.5 color Blue ]
[ 1.0 color Blue + White ]
}
}
no_shadow
}
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
background { color White }
light_source { 100*<3, 2, -1> color White }
camera {
location 5*< 1, 3, -5>
look_at < 0, -2, 0>
}
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
Post a reply to this message
Attachments:
Download 'cracklequest01.jpg' (26 KB)
Preview of image 'cracklequest01.jpg'
![cracklequest01.jpg](/povray.binaries.images/attachment/%3C3A0CC28E.18B9160A%40online.no%3E/cracklequest01.jpg?preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Tor Olav Kristensen" <tor### [at] online no> wrote in message
news:3A0CC28E.18B9160A@online.no...
> Btw.:
> You have a nice scene with interesting functions and patterns !
Many thanks Tor.. Your information was very helpful.
I have also enjoyed seeing your various isosurface experiments.
All the best,
Andy Cocker
---------------------------------------------------------------
www.mariner9.net
..... for my music and graphics.
---------------------------------------------------------------
'I spilled spot remover on my dog. He's gone now. '
'I went to a restaurant that serves "breakfast at any time."
So I ordered french toast during the Renaissance. '
- Steven Wright.
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) |
Wierd! Cool! Kinda grotesque.
Isosurfaces kick ass.
--
David Fontaine <dav### [at] faricy net> ICQ 55354965
My raytracing gallery: http://davidf.faricy.net/
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) |
Tor Olav Kristensen wrote:
>...
> I think that it's possible to construct a "ReplikateFunction" that
> also can generate grids of isosurfaces with an even number of "parts"
> along each side.
>...
I think this is such a function:
$ ReplicateFunction =
function {
OtherFunction(
x % Xspacing - if(x, 1, -1)*Xspacing/2,
y,
z % Zspacing - if(z, 1, -1)*Zspacing/2
)
}
And I think this cointaned_by statement can be
used with your iso-surface when the above
function is used:
contained_by {
box {
-<Xnr, 3.5, Znr>*<Xspacing, 1, Zspacing>,
<Xnr, 1.0, Znr>*<Xspacing, 1, Zspacing>
}
}
Best regards,
Tor Olav
--
mailto:tor### [at] hotmail com
http://www.crosswinds.net/~tok/tokrays.html
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) |
Thanks again,
Andy Cocker
---------------------------------------------------------------
www.mariner9.net
..... for my music and graphics.
---------------------------------------------------------------
'I spilled spot remover on my dog. He's gone now. '
'I went to a restaurant that serves "breakfast at any time."
So I ordered french toast during the Renaissance. '
- Steven Wright.
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) |