POV-Ray : Newsgroups : povray.general : Gravels in a glass sphere : Re: Gravels in a glass sphere Server Time
5 Nov 2024 18:24:06 EST (-0500)
  Re: Gravels in a glass sphere  
From: Tom A 
Date: 14 Feb 2003 18:11:19
Message: <3E4D7797.9090008@my-deja.com>
Dirk \"DIRKO\" Legler wrote:
> Hi!
> 
> To improve the image I posted to p.b.i, I want to know what's the best way
> to create some gravels or sand and put it on the bottom of a glass sphere
> (fish glass). And ideas?
> I already tried some blobs, but I couldn't figure out how to put them in the
> sphere correctly and they looked too artifical..
> 
> Dirk "DIRKO" Legler

I tried a couple of things:

sphere{<jj,ii,kk> .1
        pigment{ rgb .25+rand(rr)/3 }  // various gray colors
        //   pigment{ rgb <rand(rr),rand(rr),rand(rr)> }
             // random colored gravel
        normal{ facets coords 1.7}
}

That was OK.  I also created a macro to make spheres with random flat 
surfaces:

#macro facettedSphere(ssize,seedling)
   #local r=seed(seedling);
   difference{
     sphere{0, ssize}
     #local i = 0;
     #local j = int(rand(r) * 10 + rand(r)*10 + 1);
     #while (i < j )
       plane{ -y, -ssize*(.75+rand(r)/5)
              rotate< rand(r)*360,rand(r)*360, rand(r)*360>
            }
       #local i = i + 1;
     #end // i loop
   } // differenct

#end // facettedSphere

Used thus:

object{ facettedSphere( .099, rand(rr)*906 )
         translate<jj,ii,kk>
         pigment{ rgb <rand(rr),rand(rr),rand(rr)> }
       }

That looked a bit better.

However, when I put them in a M_Glass media sphere, with a modified 
M_Water media (water without the ripples, since it was giving ripples 
through the part that was against the glass) - it didn't matter what 
color or shape they were - they all faded into vague grey blobs.

Good luck.

-- 
Tom A.
"I've got the whole world
In my hands" - John, 3 year old Megalomaniac


Post a reply to this message

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