POV-Ray : Newsgroups : povray.binaries.images : Inside the Crackle pattern (161KB) Server Time
20 Apr 2024 09:43:56 EDT (-0400)
  Inside the Crackle pattern (161KB) (Message 11 to 17 of 17)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Tor Olav Kristensen
Subject: Re: Inside the Crackle pattern => Source posted & Some problems (30KB + 28KB)
Date: 18 Oct 2000 19:47:18
Message: <39EE356F.10561BCA@hotmail.com>
Christoph Hormann wrote:

> Tor Olav Kristensen wrote:
> ...
> > Has anyone else seen these kind of errors with iso-surfaces before ?
> ...
>
>
> I had a quick look at the code, your isosurface function does have abrupt
> changes of values and those often cause problems (i had problems when using
> object_pattern in isosurface functions for example) increasing max_gradient or
> accuracy might help, but in general functions with abrupt changes are not ideal
> for isosurface functions.

I was not aware of problems with such functions.

I'll bear it in mind till my next isosurface project.


I don't know what an object_pattern is, but I'll try to read some more in the
MegaPOV documentation.

Thanks again.


Tor Olav
--
mailto:tor### [at] hotmailcom
http://www.crosswinds.net/~tok/tokrays.html


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Inside the Crackle pattern (161KB)
Date: 18 Oct 2000 19:58:05
Message: <39EE37F6.8F9FBB47@hotmail.com>
Steve wrote:

> Now this looks like some sort of mythical ice cave.

It reminds me of caves too.

Theses images gives me some vague associations to a
Donald Duck story that I read when I was a child:

There were thousands of small round stones in some
enormously large underground cave systems.

These small round stones appeared to be living
creatures that caused earth quakes when collectively
rolling and colliding against the columns that supports
the surface of the earth.


Tor Olav
--
mailto:tor### [at] hotmailcom
http://www.crosswinds.net/~tok/tokrays.html


Post a reply to this message

From: Chris Huff
Subject: Re: Inside the Crackle pattern => Source posted & Some problems (30KB + 28KB)
Date: 18 Oct 2000 20:02:32
Message: <chrishuff-88AE2B.19051718102000@news.povray.org>
In article <39EE356F.10561BCA@hotmail.com>, Tor Olav Kristensen 
<tor### [at] hotmailcom> wrote:

> I don't know what an object_pattern is, but I'll try to read some 
> more in the MegaPOV documentation.

He was talking about the "object" pattern. It is a list pattern, like 
hexagon or checkers, but it chooses between the colors/pigments/etc. 
depending on whether a point is inside or outside of a specified object. 
You can use it as a text pattern...just use a text object in the pattern.

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

From: SomeGuy
Subject: Re: Inside the Crackle pattern (161KB)
Date: 19 Oct 2000 21:49:29
Message: <39EE64C5.A222897D@earthlink.net>
Wow... I saw a cartoon version of that story... Do you remember the
name...?

BTW... I like this one the best... The monochrome color really adds to
the depth of the image...

Tor Olav Kristensen wrote:

> Steve wrote:
>
> > Now this looks like some sort of mythical ice cave.
>
> It reminds me of caves too.
>
> Theses images gives me some vague associations to a
> Donald Duck story that I read when I was a child:
>
> There were thousands of small round stones in some
> enormously large underground cave systems.
>
> These small round stones appeared to be living
> creatures that caused earth quakes when collectively
> rolling and colliding against the columns that supports
> the surface of the earth.
>
> Tor Olav
> --
> mailto:tor### [at] hotmailcom
> http://www.crosswinds.net/~tok/tokrays.html


Post a reply to this message

From: SomeGuy
Subject: Re: Inside the Crackle pattern (161KB)
Date: 20 Oct 2000 01:01:21
Message: <39EE91BB.36F43756@earthlink.net>
i DL the source but i do not understand the if statement you referred to
...

I let the iso-surface do the work itself.
(-By using a pigment function inside an if statement. If the pigment
value in the middle of a "subcube" in 3D-space is above a certain
limit/threshold, a function is called to make a sphere in this
"subcube".
Else a constant outside the limit is returned.)

What does this statement exactly do... Or better yet how does it do what
it does...
How are the arguments read...?

if(
      MidOfCrackleSquare(x, y, z) - Threshold,
      ManySpheres(x, y, z),
      1
    )

Im guessing if mid of crackle square... then do many spheres... what is
the 1... threshold...?
please help,


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Inside the Crackle pattern (161KB)
Date: 23 Oct 2000 16:32:55
Message: <39F4A073.1E7D61B0@online.no>
SomeGuy wrote:

> Wow... I saw a cartoon version of that story... Do you remember the
> name...?

No, I'm sorry. It's too many years ago (20++).


> BTW... I like this one the best... The monochrome color really adds to
> the depth of the image...

Thanks.


Regards,

Tor Olav
--
mailto:tor### [at] hotmailcom
http://www.crosswinds.net/~tok/tokrays.html


> Tor Olav Kristensen wrote:
> > ...
> > Theses images gives me some vague associations to a
> > Donald Duck story that I read when I was a child:
> >
> > There were thousands of small round stones in some
> > enormously large underground cave systems.
> >
> > These small round stones appeared to be living
> > creatures that caused earth quakes when collectively
> > rolling and colliding against the columns that supports
> > the surface of the earth.


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Inside the Crackle pattern (161KB)
Date: 23 Oct 2000 20:37:31
Message: <39F4D9AD.3F6B2F20@online.no>
SomeGuy wrote:

> i DL the source but i do not understand the if statement you referred to
> ...
>
> I let the iso-surface do the work itself.
> (-By using a pigment function inside an if statement. If the pigment
> value in the middle of a "subcube" in 3D-space is above a certain
> limit/threshold, a function is called to make a sphere in this
> "subcube".
> Else a constant outside the limit is returned.)
>
> What does this statement exactly do... Or better yet how does it do what
> it does...
> How are the arguments read...?
>
> if(
>       MidOfCrackleSquare(x, y, z) - Threshold,
>       ManySpheres(x, y, z),
>       1
>     )
>
> Im guessing if mid of crackle square... then do many spheres... what is
> the 1... threshold...?
> please help,

I find this difficult to explain, but I'll give it a try.

Here I go:
(Anyone please correct me if I'm telling any lies here.)

For "every" point inside the contained_by shape, find out which
cube in 3D-space this point is contained within.
(E.g. The point <3.4, 7.8, 0.1> is contained within the cube
with opposite corners <3, 7, 0> and <4, 8, 1>.)

Find the middle of this cube and fetch the field strength for the
crackle pattern at that midpoint. (E.g.: The midpoint of the cube
above is <3 + 0.5, 7 + 0.5, 0 + 0.5> = <3.5, 7.5, 0.5>)

(The MidOfCrackleSquare function calculates the coordinates
for these midpoints. {A better name for this function would have
been MidOfCrackleCube.} The MidOfCrackleSquare calls the
CrackleFunction and passes the midpoint to it. The
CrackleFunction returns the "field strength" value at this point.)

Then the field strength is checked if it is above a certain
"Threshold" limit. If it is, then the point belongs to a set of points
that "later" will be evaluated as candidates for being inside a
sphere within the cube.

All such points that are found to be inside such a cube with
an "OK" threshold in it's middle are evaluated with the
ManySpheres function.

If they are found to be inside a cube with a "wrong" threshold
in its middle, they are "assigned" with a value that guarantees
that they are not candidates for being considered as "insiders"
to the isosurface.

The ManySpheres function translates the point given it
to a corresponding position within a similar cube centred
around origo.

Then the ManySpheres function calls the built in "sphere"
function that calculates how far the translated point is from
the surface of a sphere centred around origo. (It returns
positive values if the translated point are outside the sphere.
0 if it's on the sphere's surface, and negative values if it's inside
the sphere.)

The result of this is that the original point is assigned the same
value as it's translated version.

One can imagine that after "all" points inside the contained_by
shape have been evaluated, they have been assigned a value
that now are checked to see if they are inside, outside or on
the isosurface.

All the points that was not assigned a "guaranteed not insiders"
value, are now candidates for being _on_ the isosurface or
inside it.

The float after the isosurface's threshold keyword gives the
potential that the value of every such points is checked against.

If a point has an "assigned" value that is equal to this potential,
then it is _on_ the isosurface. If its value is greater than this
potential, then the point is outside the isosurface, and if its value
is less than this potential, then the point is inside the isosurface.

So if the isosurface shape is not involved in any CSG-operations
then only the points that are _on_ the isosurface are "visible".


Notes:

To find the radii of the spheres in the image, just add the
the value after the threshold keyword (0.2) to the radius
given to the built in function "sphere" (0.2). Thus the radius
of all the spheres are 0.4.

To find a suitable value to be assigned to "guaranteed not
insiders" points, one can select a value just above the value
after the threshold keyword (0.2). I had not reflected much
about this, so I chose the value 1. (0.21 would have been
sufficient.)


Feel free to ask more if there's anything that needs more
explaining.

Below are some code made for playing around with my
ManySpheres function.

P.S.:
Try to uncomment the commented lines different combi-
nations (At different resolutions and AA settings)

Tor Olav
--
mailto:tor### [at] hotmailcom
http://www.crosswinds.net/~tok/tokrays.html

// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7

#version unofficial MegaPov 0.5;
#include "colors.inc"

// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7

#declare SphereFunction = function { "sphere" <0.1> }

#declare ManySpheres =
function {
  SphereFunction(
    x - floor(x) - 0.5,
    y - floor(y) - 0.5,
    z - floor(z) - 0.5
  )
}

isosurface {
  function { ManySpheres(x, y, z) }
//  threshold 0.1
  contained_by { sphere { <0, 0, 0>, 200 } }
//  method 1
  pigment { color Yellow }
  no_shadow
}

// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7

background { color Blue/2 }

//light_source { 1000*<-3, -4, 2> color White*2 }
light_source { 1000*<0, 1, 0> color White*2 }

camera {
  location <0, 0, -10.5>//*60
  look_at <0, 0, 0>
//  angle 35
}

// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.