![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Greg M Johnson
Subject: Fill any object with dense-packed spheres of any radius (16kbbu)
Date: 30 Dec 2000 21:51:04
Message: <3a4e9f18@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
See file in p.b.s.-f.
Code fills with spheres in fcc structure.
Post a reply to this message
Attachments:
Download 'volume31.jpg' (16 KB)
Preview of image 'volume31.jpg'
![volume31.jpg](/povray.binaries.images/attachment/%3C3a4e9f18%40news.povray.org%3E/volume31.jpg?ttop=443840&toff=11400&preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Andy Cocker
Subject: Re: Fill any object with dense-packed spheres of any radius (16kbbu)
Date: 30 Dec 2000 21:55:22
Message: <3a4ea01a@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Greg M. Johnson" <"gregj;-)56590\""@aol.c;-)om> wrote in message
news:3a4e9f18@news.povray.org...
> See file in p.b.s.-f.
>
> Code fills with spheres in fcc structure.
This looks very interesting Greg.. I'll go get the code now. Thanks
Andy Cocker
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: ian mcdonald
Subject: Re: Fill any object with dense-packed spheres of any radius (16kbbu)
Date: 31 Dec 2000 08:51:31
Message: <3a4f39e3$1@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
I'd been trying to do something similar, which I gave up on.
My version was to imitate the pov-ray rendering icon, where any space is
filled with X-point touching randomly scaled and translated spheres of
random texture having no intersections.
I never got it to work. I never came close. I don't even know where to start
beyond needing an intersection testing algorhythm.
ian
Greg M. Johnson <"gregj;-)56590\""@aol.c;-)om> wrote in message
news:3a4e9f18@news.povray.org...
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Greg M Johnson
Subject: Re: Fill any object with dense-packed spheres of any radius (16kbbu)
Date: 31 Dec 2000 09:09:37
Message: <3a4f3e21@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
ian mcdonald wrote:
> I never got it to work. I never came close. I don't even know where to start
> beyond needing an intersection testing algorhythm.
You don't need that. The object function does the trick, plus knowing how the
face centered cubic structure is stacked...
Here is the core of my algo:
#declare obfun=pigment {object {MyObject color Black color White}}
#local dd=array[5]
#local drr=(2^0.5)*radii;
#local dd[1]=<0,0,0>;
#local dd[2]=<0,drr,drr>;
#local dd[3]=<drr,0,drr>;
#local dd[4]=<drr,drr,0>;
#local place=dd[nnnn]+<minx+ix*dx,miny+iy*dy,minz+iz*dz>;
#local blank=eval_pigment(obfun,place);
#if (blank.x>0)
sphere {place,radii*1}
#end
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Francois Labreque
Subject: Re: Fill any object with dense-packed spheres of any radius (16kbbu)
Date: 31 Dec 2000 10:04:00
Message: <3A4F4A4A.3FB3A8E2@videotron.ca>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Greg M. Johnson" wrote:
>
> ian mcdonald wrote:
>
> > I never got it to work. I never came close. I don't even know where to start
> > beyond needing an intersection testing algorhythm.
>
> You don't need that. The object function does the trick, plus knowing how the
> face centered cubic structure is stacked...
>
> Here is the core of my algo:
>
> #declare obfun=pigment {object {MyObject color Black color White}}
^^^^^^^^
What's this?
From what I understand, it is someway of making sure the inside of your
object is white, and the outside, black. Am I right?
--
Francois Labreque | Rimmer: "Let's go to red alert!"
flabreque | Kryten: "Are you sure, Sir? You realize it
@ | actually means changing the bulb!"
videotron.ca
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 <3A4F4A4A.3FB3A8E2@videotron.ca>, Francois Labreque
<fla### [at] videotron ca> wrote:
> From what I understand, it is someway of making sure the inside of your
> object is white, and the outside, black. Am I right?
He is using the object pattern in MegaPOV as an interior testing method,
the first thing following the object covers all points outside the
object, the second covers all interior points. So you are correct, it is
a pigment that is a white shape surrounded by black in the shape of the
object.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.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 <3a4f3e21@news.povray.org>, "Greg M. Johnson"
<"gregj;-)56590\""@aol.c;-)om> wrote:
> Here is the core of my algo:
>
> #declare obfun=pigment {object {MyObject color Black color White}}
> #local blank=eval_pigment(obfun,place);
Hmm, I use something more like "eval_pattern(object {MyObject})" when I
do this...actually, I wrap it in a macro.
This would make your code shorter and probably slightly reduce parse
time(though the use of a macro might counteract that benefit), the main
advantage is that it is shorter and easier to read.
Instead of:
#declare obfun=pigment {object {MyObject color Black color White}}
...
#local blank=eval_pigment(obfun,place);
#if (blank.x>0)
My version would be:
#macro InObj(Pt, Obj) eval_pattern(object {Obj}, Pt) #end
...
#if(InObj(place, MyObject))
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.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) |