POV-Ray : Newsgroups : povray.newusers : Stacking stones without overlapping Server Time
2 Jul 2024 22:25:51 EDT (-0400)
  Stacking stones without overlapping (Message 5 to 14 of 64)  
<<< Previous 4 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Bald Eagle
Subject: Re: Stacking stones without overlapping
Date: 15 Jun 2017 14:45:01
Message: <web.5942d54dd8d105e9c437ac910@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:
> As Stephen said, placing lots of objects so that [they] don't overlap or intersect
is
> not trivial-- but it CAN be done, of course.

Well, I'd have to say that writing the code to do it isn't complicated, and may
indeed be "trivial".
Writing GOOD code that minimizes the number of intersection tests, and
efficiently fills the interstices IS a task that requires a fair amount of
education, knowledge, forethought, experience, creativity, skill, talent, and
inspiration.
But I think there are likely enough extant examples on the web of things that
are close enough so that he can implement it in a reasonable amount of time.

> With the proper coding in POV-Ray's
> "scene description language" (SDL), just about *anything* is possible.

Indeed.  :)  I like to keep everything in my scenes wholly in POV-Ray, and
completely generated by the SDL, if at all possible.
Sometimes it's not exactly "practical" - but proof-of-concept projects rarely
are.


Another thought just occurred to me - a wicked fast way to do something very
close to this, with no need for any sort of coding whatsoever.
It all lies in what Form you choose to code this in.  I'll just let that hint of
an idea Crackle on the back burner for a while until the coding for it becomes
Solid.

;)


Post a reply to this message

From: Kenneth
Subject: Re: Stacking stones without overlapping
Date: 15 Jun 2017 15:50:00
Message: <web.5942e402d8d105e9883fb31c0@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:

>...a task that requires a fair amount of
> education, knowledge, forethought, experience, creativity, skill, talent, and
> inspiration.

Yeah; I'm working on those ;-)

I need a Star Trek 'brain boost'


Post a reply to this message

From: Stephen
Subject: Re: Stacking stones without overlapping
Date: 15 Jun 2017 17:08:06
Message: <5942f736$1@news.povray.org>
On 6/15/2017 8:46 PM, Kenneth wrote:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
>
>> ...a task that requires a fair amount of
>> education, knowledge, forethought, experience, creativity, skill, talent, and
>> inspiration.
>
> Yeah; I'm working on those ;-)
>

I gave up on that years ago and signed a long contract in blood with Satan.


> I need a Star Trek 'brain boost'
>
>
As always. :)

https://www.youtube.com/watch?v=FCARADb9asE

-- 

Regards
     Stephen


Post a reply to this message

From: Thomas de Groot
Subject: Re: Stacking stones without overlapping
Date: 16 Jun 2017 02:46:53
Message: <59437edd@news.povray.org>
On 15-6-2017 20:43, Bald Eagle wrote:

> Another thought just occurred to me - a wicked fast way to do something very
> close to this, with no need for any sort of coding whatsoever.
> It all lies in what Form you choose to code this in.  I'll just let that hint of
> an idea Crackle on the back burner for a while until the coding for it becomes
> Solid.
>
> ;)
>
>

That is really wicked!! ;-)

-- 
Thomas


Post a reply to this message

From: Ari
Subject: Re: Stacking stones without overlapping
Date: 16 Jun 2017 03:00:00
Message: <web.5943814dd8d105e99d2528170@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> Welcome, Ari   :)
>
> I'd suggest having a look at Jonathan Hunt's excellent pebbles.pov file:
>
>
http://news.povray.org/povray.text.scene-files/thread/%3C48d158e3$1@news.povray.org%3E/
>
> If you're interested in experimenting with some simple self-written scenes first
> / along the way, I'd suggest learning some of the random functions:
>
> http://www.f-lohmueller.de/pov_tut/random/random6e.htm
>
> The easiest way to place your grains so that they don't intersect is to treat
> them as perfect spheres, and make sure that the distance between the centers is
> no less than the sum of the radii.
>
> You can look into structuring your placement algorithm so that it's as fast as
> possible.   There are "naive" ways, and then there are ways that make use of
> subdividing the space to make the search for a valid place to place a new grain
> a lot faster.
>
> https://www.google.com/search?q=algorithm+o
>
>
http://news.povray.org/povray.newusers/message/%3C53260cc5%40news.povray.org%3E/#%3C53260cc5%40news.povray.org%3E
>
>
> [As an aside, is there an easy mechanism by which I can access the thread for
> the given image from the image's URL?]
>
http://news.povray.org/povray.binaries.images/attachment/%3C4d98c518%40news.povray.org%3E/27841-grains.jpg
Thank you for the useful information, Eagle!
I would try to read them and see if I could be equipped with such important
skills.
By the way, the thread URL is
http://news.povray.org/povray.binaries.images/thread/%3Cweb.4d97bab0dc7be259e5cacc00%40news.povray.org%3E/?mtop=360023
 :D


Post a reply to this message

From: Thomas de Groot
Subject: Re: Stacking stones without overlapping
Date: 16 Jun 2017 03:06:38
Message: <5943837e$1@news.povray.org>
On 15-6-2017 18:27, Bald Eagle wrote:

> [As an aside, is there an easy mechanism by which I can access the thread for
> the given image from the image's URL?]
>
http://news.povray.org/povray.binaries.images/attachment/%3C4d98c518%40news.povray.org%3E/27841-grains.jpg
>

The name Samuel Benge imposes itself on me for some reason, but I am not 
really sure and I cannot find anything related to this in the code I 
have from him. The image is very familiar and I remember we have 
discussed this in the (recent?) past. So, yes indeed, we need a better 
link to the thread.

-- 
Thomas


Post a reply to this message

From: Stephen
Subject: Re: Stacking stones without overlapping
Date: 16 Jun 2017 03:35:41
Message: <59438a4d$1@news.povray.org>
On 6/16/2017 7:57 AM, Ari wrote:
> By the way, the thread URL is
>
http://news.povray.org/povray.binaries.images/thread/%3Cweb.4d97bab0dc7be259e5cacc00%40news.povray.org%3E/?mtop=360023


I read the thread and if I understood it*. Sam used an external program, 
he developed himself, to calculate the positions of the grains.
So, in my opinion, unless using a third party program like bullet 
physics or Blender is acceptable. Then it would be very difficult to get 
the quality of Sam's image. But since you are a first year engineering 
student. It might be acceptable to use tools in addition to PovRay.

*

I am no mathematician.

It raises an interesting philosophical question.

Were you given that image and told to reproduce it or did you pick it 
yourself?
Does the person who gave you the problem have a solution?
And in an engineering frame. What tolerances do you need to work to?


I said that I was no mathematician and that is two questions. ;-)



-- 

Regards
     Stephen


Post a reply to this message

From: omniverse
Subject: Re: Stacking stones without overlapping
Date: 16 Jun 2017 05:20:01
Message: <web.5943a27bd8d105e99c5d6c810@news.povray.org>
Stephen <mca### [at] aolcom> wrote:
> On 6/16/2017 7:57 AM, Ari wrote:
> > By the way, the thread URL is
> >
http://news.povray.org/povray.binaries.images/thread/%3Cweb.4d97bab0dc7be259e5cacc00%40news.povray.org%3E/?mtop=360
023
>
> I read the thread and if I understood it*. Sam used an external program,
> he developed himself, to calculate the positions of the grains.

A wizard for sure, as are many others. I missed so much all those years ago but
already had seen plenty being done by Samuel.

I guess if I were to attempt my own "stacking stones" it would probably be
something like I had used for object interactions with simplistic 'sphere of
influence' for mass and gravity when I was doing rudimentary space simulations
in Basic programming (circa 1980's).
Not ideal for this, even if I could get it right in POV-Ray.

Bob


Post a reply to this message

From: Stephen
Subject: Re: Stacking stones without overlapping
Date: 16 Jun 2017 06:26:38
Message: <5943b25e$1@news.povray.org>
On 6/16/2017 10:18 AM, omniverse wrote:
> Stephen <mca### [at] aolcom> wrote:
>> On 6/16/2017 7:57 AM, Ari wrote:
>>> By the way, the thread URL is
>>>
http://news.povray.org/povray.binaries.images/thread/%3Cweb.4d97bab0dc7be259e5cacc00%40news.povray.org%3E/?mtop=360
> 023
>>
>> I read the thread and if I understood it*. Sam used an external program,
>> he developed himself, to calculate the positions of the grains.
>
> A wizard for sure, as are many others. I missed so much all those years ago but
> already had seen plenty being done by Samuel.
>

Yes a wizard. I wonder when he will reappear to drop off another gem.

> I guess if I were to attempt my own "stacking stones" it would probably be
> something like I had used for object interactions with simplistic 'sphere of
> influence' for mass and gravity when I was doing rudimentary space simulations
> in Basic programming (circa 1980's).

Ah! basic. Now you are talking. :)
I managed to get a lander program working on a Casio calculator, in basic.

> Not ideal for this, even if I could get it right in POV-Ray.
>


I can see it working on rectangular stones as in a dry stone dyke. You 
would not have to be too concerned about gaps between rounded stones, I 
think.


-- 

Regards
     Stephen


Post a reply to this message

From: Bald Eagle
Subject: Re: Stacking stones without overlapping
Date: 16 Jun 2017 08:05:01
Message: <web.5943c899d8d105e9c437ac910@news.povray.org>
"Ari" <win### [at] yahoocomhk> wrote:

> By the way, the thread URL is
>
http://news.povray.org/povray.binaries.images/thread/%3Cweb.4d97bab0dc7be259e5cacc00%40news.povray.org%3E/?mtop=36002
3


Aha.
That was a good read, and I'd say that some excellent info is contained therein
- especially the scene code and that last post.

Up to this point, I'd say that the focus has been on using a random placement as
the fundamental method by which to build the pile, however, a stepwise #while
loop that built the pile up in strata would be a different approach - with
different advantages and challenges.

I'd say that there's a whole world of interesting algorithmic material out there
that could be applied to this, and certainly the Graphics Gems series and some
of those Numerical Recipes type code examples might help.
You might want to take a look at things like Appolonian Gaskets, Steiner circles
and spheres, canal and channel surfaces, fractals, closest packing schemes and
crystallography, and Voronoi diagrams and Delaunay triangulations.

http://paulbourke.net/fractals/apollony/


The key at this point though, is to keep it simple and fast enough to get the
job done.  Don't "let the perfect be the enemy of the good." ;)


Post a reply to this message

<<< Previous 4 Messages Goto Latest 10 Messages Next 10 Messages >>>

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