POV-Ray : Newsgroups : povray.unofficial.patches : crackle: suggested extensions Server Time
10 Oct 2026 07:43:00 EDT (-0400)
  crackle: suggested extensions (Message 1 to 19 of 19)  
From: Anton Sherwood
Subject: crackle: suggested extensions
Date: 10 May 2001 02:37:00
Message: <3AFA373F.3993FC9F@pobox.com>
"crackle metric infinite"
replaces (dx^n + dy^n + dz^n)^(1/n) with max(dx,dy,dz)

"crackle tumbled"
randomly rotates, for each nucleus, the coordinate axes on which
dx,dy,dz are computed.  (has no effect on metric 2.)  without this, the
`grains' all line up alike, which is generally not how real minerals
behave.


i'll go be quiet now.

-- 
Anton Sherwood  --  br0### [at] p0b0xcom  --  http://ogre.nu/


Post a reply to this message

From: Christoph Hormann
Subject: Re: crackle: suggested extensions
Date: 10 May 2001 03:11:58
Message: <3AFA3F73.38EFD2E3@gmx.de>
Anton Sherwood wrote:
> 
> "crackle metric infinite"
> replaces (dx^n + dy^n + dz^n)^(1/n) with max(dx,dy,dz)
> 
> "crackle tumbled"
> randomly rotates, for each nucleus, the coordinate axes on which
> dx,dy,dz are computed.  (has no effect on metric 2.)  without this, the
> `grains' all line up alike, which is generally not how real minerals
> behave.
> 
> i'll go be quiet now.
> 

Hmm, sounds interesting, do you have some sample pictures? 'infinite'
would also be much faster BTW.

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Anton Sherwood
Subject: Re: crackle: suggested extensions
Date: 15 May 2001 02:31:26
Message: <3B00CD77.3522F391@pobox.com>
> > Anton Sherwood wrote:
> > > "crackle metric infinite"
> > > replaces (dx^n + dy^n + dz^n)^(1/n) with max(dx,dy,dz)
> > >
> > > "crackle tumbled"
> > > randomly rotates, for each nucleus, the coordinate axes on which
> > > dx,dy,dz are computed.  (has no effect on metric 2.) ...

> Christoph Hormann wrote:
> > Hmm, sounds interesting, do you have some sample pictures?

Anton Sherwood wrote:
> [some urls]


Scratch that (sorry i can't cancel) - see
	http://ogre.nu/tumble/


> (The distribution of nuclei is likely wrong.)

-- 
Anton Sherwood  --  br0### [at] p0b0xcom  --  http://ogre.nu/


Post a reply to this message

From: Christoph Hormann
Subject: Re: crackle: suggested extensions
Date: 15 May 2001 03:00:48
Message: <3B00D479.DA7D3AE3@gmx.de>
These all look really good, will you release a patch with that extension?

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Anton Sherwood
Subject: Re: crackle: suggested extensions
Date: 15 May 2001 10:38:20
Message: <3B013F95.3224DA5A@pobox.com>
Christoph Hormann wrote:
> These all look really good, will you release a patch with that
> extension?

Do I look like a programmer? ;)  Those are fakes.

Oops, maybe I shouldn't have said that.
In an old sf story, some scientists are shown a top-secret movie of an
antigravity experiment, and told that the movie is the only record
surviving after an explosion killed everyone in the project.  The
scientists go away and "re"invent antigravity.  Afterward, it is
revealed that the movie was a fake.

-- 
Anton Sherwood  --  br0### [at] p0b0xcom  --  http://ogre.nu/


Post a reply to this message

From: Christoph Hormann
Subject: Re: crackle: suggested extensions
Date: 15 May 2001 11:25:18
Message: <3B014AB7.ED28D813@gmx.de>
Anton Sherwood wrote:
> 
> Do I look like a programmer? ;)  Those are fakes.

Ohhh!

And how did you do them?

I really wonder if the actual implementation would look the same...  

> 
> Oops, maybe I shouldn't have said that.
> In an old sf story, some scientists are shown a top-secret movie of an
> antigravity experiment, and told that the movie is the only record
> surviving after an explosion killed everyone in the project.  The
> scientists go away and "re"invent antigravity.  Afterward, it is
> revealed that the movie was a fake.
> 

:-)

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Ron Parker
Subject: Re: crackle: suggested extensions
Date: 15 May 2001 12:10:09
Message: <slrn9g2l72.p9m.ron.parker@fwi.com>
On Wed, 09 May 2001 23:37:51 -0700, Anton Sherwood wrote:
>"crackle metric infinite"
>replaces (dx^n + dy^n + dz^n)^(1/n) with max(dx,dy,dz)

This one's pretty easy, and certainly nicer than the current solution of
just setting the metric really high and waiting.

>"crackle tumbled"
>randomly rotates, for each nucleus, the coordinate axes on which
>dx,dy,dz are computed.  (has no effect on metric 2.)  without this, the
>`grains' all line up alike, which is generally not how real minerals
>behave.

Do you happen to have a formula that will translate a random vector in the
unit cube between <0,0,0> and <1,1,1> into a set of basis vectors and give
uniform coverage of the space of all possible basis vectors?  I seem to have
left mine in my other coat.

-- 
#macro R(L P)sphere{L F}cylinder{L P F}#end#macro P(V)merge{R(z+a z)R(-z a-z)R(a
-z-z-z a+z)torus{1F clipped_by{plane{a 0}}}translate V}#end#macro Z(a F T)merge{
P(z+a)P(z-a)R(-z-z-x a)pigment{rgbf 1}hollow interior{media{emission 3-T}}}#end 
Z(-x-x.2x)camera{location z*-10rotate x*90normal{bumps.02scale.05}}


Post a reply to this message

From: Anton Sherwood
Subject: Re: crackle: suggested extensions
Date: 15 May 2001 23:03:27
Message: <3B01EE39.313F5BB8@pobox.com>
Ron Parker wrote:
> Do you happen to have a formula that will translate a random vector
> in the unit cube between <0,0,0> and <1,1,1> into a set of basis
> vectors and give uniform coverage of the space of all possible
> basis vectors?  I seem to have left mine in my other coat.

<g>

I'll think about it some more, and come up with a dumb idea.
Then I'll ask sci.math.

It doesn't have to be purely uniform, though;
rotate <90*rand(),90*rand(),90*rand()> might be good enough.

-- 
Anton Sherwood  --  br0### [at] p0b0xcom  --  http://ogre.nu/


Post a reply to this message

From: Anton Sherwood
Subject: Re: crackle: suggested extensions
Date: 16 May 2001 01:21:00
Message: <3B020E76.8456E686@pobox.com>
> Ron Parker wrote:
> > Do you happen to have a formula that will translate a random vector
> > in the unit cube between <0,0,0> and <1,1,1> into a set of basis
> > vectors and give uniform coverage of the space of all possible
> > basis vectors?  I seem to have left mine in my other coat.

Anton Sherwood wrote:
> I'll think about it some more, and come up with a dumb idea.
> Then I'll ask sci.math.

Got it.  (I'll call your random vector <rx,ry,rz>)

theta = rx*2*pi;
phi = acos(2*ry-1);
v0 = sphere_to_xyz(theta,phi); /* uniform by Archimedean theorem */
vtemp = one of the axis vectors, 
	corresponding to the smallest component of v0;
v1 = vaxis_rotate(vtemp,v0,rz*360);
v2 = vcross(v0,v1);
v0 = vcross(v1,v2);

v0,v1,v2 are the new basis.

(The rigmarole with vtemp is to get it down to three rands;
it's more obvious with four.)

-- 
Anton Sherwood  --  br0### [at] p0b0xcom  --  http://ogre.nu/


Post a reply to this message

From: Anton Sherwood
Subject: Re: crackle: suggested extensions
Date: 16 May 2001 01:39:23
Message: <3B0212C5.11228917@pobox.com>
> > Do I look like a programmer? ;)  Those are fakes.

Christoph Hormann wrote:
> Ohhh!
> And how did you do them?

Mesh pyramids, randomly placed, variously pigmented: gradient z
for "color", slope for "normal", rgb <rand()...> for "solid".
finish { ambient 1 }
camera { orthographic }


> I really wonder if the actual implementation would look the same...

I'd expect some difference because I only rotated the pyramids on z --
and because I've no idea how crackle places the nuclei.


... Meanwhile, another idea: if (dx,dy,dz) were replaced with
(dx+dy,dx+dz,dy+dz), the `crystal' would be a rhombic dodecahedron. 
Maybe I can get Grimbert interested. ;)

Is there a "So You Want To Patch Povray" faq somewhere?


-- 
Anton Sherwood  --  br0### [at] p0b0xcom  --  http://ogre.nu/


Post a reply to this message

From: Anton Sherwood
Subject: Re: crackle: suggested extensions
Date: 16 May 2001 22:39:34
Message: <3B033A20.637F891D@pobox.com>
Anton Sherwood wrote:
> theta = rx*2*pi;
> phi = acos(2*ry-1);
> v0 = sphere_to_xyz(theta,phi); /* uniform by Archimedean theorem */
> vtemp = one of the axis vectors,
>         corresponding to the smallest component of v0;
> v1 = vaxis_rotate(vtemp,v0,rz*360);
> v2 = vcross(v0,v1);
> v0 = vcross(v1,v2);

oops, make that last line v1=vcross(v2,v0).

> v0,v1,v2 are the new basis.


-- 
Anton Sherwood  --  br0### [at] p0b0xcom  --  http://ogre.nu/


Post a reply to this message

From: Anton Sherwood
Subject: Re: crackle: suggested extensions
Date: 19 May 2001 17:25:37
Message: <3B06E510.A1811A1B@pobox.com>
> Christoph Hormann wrote:
> > I really wonder if the actual implementation would look the same...

Anton Sherwood wrote:
> I'd expect some difference because I only rotated the pyramids on z --
> and because I've no idea how crackle places the nuclei.

And (oops) some of the pyramids ought to have flat peaks.

-- 
Anton Sherwood  --  br0### [at] p0b0xcom  --  http://ogre.nu/


Post a reply to this message

From: Anton Sherwood
Subject: Re: crackle: suggested extensions
Date: 21 May 2001 19:41:10
Message: <3B09A7D7.79260A8D@pobox.com>
Ron Parker wrote:
> Do you happen to have a formula that will translate a random vector in
> the unit cube between <0,0,0> and <1,1,1> into a set of basis vectors
> and give uniform coverage of the space of all possible basis vectors? 
> I seem to have left mine in my other coat.

I forgot to ask: are the noise-vector's components independent?

-- 
Anton Sherwood  --  br0### [at] p0b0xcom  --  http://ogre.nu/


Post a reply to this message

From: Ron Parker
Subject: Re: crackle: suggested extensions
Date: 22 May 2001 01:09:48
Message: <slrn9gjt50.v61.ron.parker@fwi.com>
On Mon, 21 May 2001 16:42:15 -0700, Anton Sherwood wrote:
>Ron Parker wrote:
>> Do you happen to have a formula that will translate a random vector in
>> the unit cube between <0,0,0> and <1,1,1> into a set of basis vectors
>> and give uniform coverage of the space of all possible basis vectors? 
>> I seem to have left mine in my other coat.
>
>I forgot to ask: are the noise-vector's components independent?

They should be.  If they aren't, we have a bigger problem. :)

-- 
#macro R(L P)sphere{L F}cylinder{L P F}#end#macro P(V)merge{R(z+a z)R(-z a-z)R(a
-z-z-z a+z)torus{1F clipped_by{plane{a 0}}}translate V}#end#macro Z(a F T)merge{
P(z+a)P(z-a)R(-z-z-x a)pigment{rgbt 1}hollow interior{media{emission T}}finish{
reflection.1}}#end Z(-x-x.2y)Z(-x-x.4x)camera{location z*-10rotate x*90}


Post a reply to this message

From: Anton Sherwood
Subject: Re: crackle: suggested extensions
Date: 6 Jun 2002 22:21:22
Message: <3D00188D.86C4C89E@pobox.com>
(Will anyone ever read this?)

> > Ron Parker wrote:
> > > Do you happen to have a formula that will translate a random
> > > vector in the unit cube between <0,0,0> and <1,1,1> into a set
> > > of basis vectors and give uniform coverage of the space of all
> > > possible basis vectors?  I seem to have left mine in my other
> > > coat.
> 
> Anton Sherwood wrote:
> > I'll think about it some more, and come up with a dumb idea.

Anton Sherwood wrote:
> Got it.  (I'll call your random vector <rx,ry,rz>)
> [...code...]

A year later, it hits me that this ought to work just as well:
	rotate <360*rx, degrees(asin(1-2*ry)), 360*rz>
(though of course one wouldn't really use degrees arithmetic)

Choosing a basis is equivalent to choosing a point on the sphere and a
rotation around it.  My first code essentially did it in that order. 
The reverse looks more efficient.


-- 
Anton Sherwood, http://www.ogre.nu/


Post a reply to this message

From: Ron Parker
Subject: Re: crackle: suggested extensions
Date: 16 Jul 2002 16:21:12
Message: <slrnaj901q.lnd.ron.parker@fwi.com>
On Thu, 06 Jun 2002 19:21:01 -0700, Anton Sherwood wrote:
> (Will anyone ever read this?)

No.

Now I have to go back and find the articles it's referring to...

-- 
#local R=rgb 99;#local P=R-R;#local F=pigment{gradient x}box{0,1pigment{gradient
y pigment_map{[.5F pigment_map{[.3R][.3F color_map{[.15red 99][.15P]}rotate z*45
translate x]}]#local H=pigment{gradient y color_map{[.5P][.5R]}scale 1/3}[.5F
pigment_map{[.3R][.3H][.7H][.7R]}]}}}camera{location.5-3*z}//only my opinions


Post a reply to this message

From: Anton Sherwood
Subject: Re: crackle: suggested extensions
Date: 7 Feb 2014 23:45:59
Message: <52f5b687@news.povray.org>
On 2001-5-15 22:40, Anton Sherwood wrote:
> ... Meanwhile, another idea: if (dx,dy,dz) were replaced with
> (dx+dy,dx+dz,dy+dz), the `crystal' would be a rhombic dodecahedron.

Or not.  Less than 13 years later, as I was thinking about something 
unrelated to ray-tracing, it hit me that it would have to be
	(dx+dy, dx-dy, dx+dz, dx-dz, dy+dz, dy-dz).

-- 
*\\* Anton Sherwood *\\* www.bendwavy.org


Post a reply to this message

From: Anton Sherwood
Subject: Re: crackle: suggested extensions
Date: 21 Mar 2014 18:27:06
Message: <532cbcba$1@news.povray.org>
> On 2001-5-15 22:40, Anton Sherwood wrote:
>> ... Meanwhile, another idea: if (dx,dy,dz) were replaced with
>> (dx+dy,dx+dz,dy+dz), the `crystal' would be a rhombic dodecahedron.

On 2014-2-07 20:45, Anton Sherwood wrote:
> Or not.  Less than 13 years later, as I was thinking about something
> unrelated to ray-tracing, it hit me that it would have to be
> 	(dx+dy, dx-dy, dx+dz, dx-dz, dy+dz, dy-dz).

Or ( abs(dx)+abs(dy), abs(dx)+abs(dz), abs(dy)+abs(dz) ),
which is probably what I meant in the first place.

-- 
*\\* Anton Sherwood *\\* www.bendwavy.org


Post a reply to this message

From: Stephen
Subject: Re: crackle: suggested extensions
Date: 22 Mar 2014 07:15:00
Message: <web.532d6f93ad8c17a9e0ead47e0@news.povray.org>
Anton Sherwood <bro### [at] poboxcom> wrote:
> On 2001-5-15 22:40, Anton Sherwood wrote:
> > ... Meanwhile, another idea: if (dx,dy,dz) were replaced with
> > (dx+dy,dx+dz,dy+dz), the `crystal' would be a rhombic dodecahedron.
>
> Or not.  Less than 13 years later, as I was thinking about something
> unrelated to ray-tracing, it hit me that it would have to be
>  (dx+dy, dx-dy, dx+dz, dx-dz, dy+dz, dy-dz).
>
> --
> *\\* Anton Sherwood *\\* www.bendwavy.org

You persevere I'll say that for you. :-)


Post a reply to this message

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