Nieminen Mika <war### [at] assari cc tut fi> 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
|