POV-Ray : Newsgroups : povray.general : A bowl of rice : Re: A bowl of rice Server Time
13 Aug 2024 23:16:44 EDT (-0400)
  Re: A bowl of rice  
From: Mathias Broxvall
Date: 23 May 1998 15:05:26
Message: <1d9hesy.3ehli8chqklgN@dialup174-2-36.swipnet.se>
Nieminen Mika <war### [at] assaricctutfi> wrote:

>   If you know which function defines the inner surface of the bowl (for
> example if it's a spherical surface it's really easy) you can use a
> #while loop and position thousands of rice grains with the rand function
> inside the bowl with the function that defines it (I don't know if you
> understood... my english is not very good :) )
>   An example says more than 1000 words (I think :) )
>

The problem probably isn't *that* simple. I haven't run your code but
I expect the ricegrains to intersect each other... right? Maybe that
dosn't matter since if you boild rice to hard they clutter together
but it might be worth to mention in case anyone want to adapt this 
method to something else...

/ Mathias Broxvall.

PS. I'd write a small hack in C that generates the positions of the
rice grains, that way I can create a list of all current ricegrains 
and check for intersections when I place a new ricegrain... Though
that would take O(n^2) time instead of linear time...
.DS


Post a reply to this message

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