POV-Ray : Newsgroups : povray.binaries.images : Underwater air bubbles : Re: Underwater air bubbles Server Time
30 Jul 2024 22:23:36 EDT (-0400)
  Re: Underwater air bubbles  
From: stbenge
Date: 24 Mar 2011 14:44:28
Message: <4d8b910c$1@news.povray.org>
On 3/24/2011 11:24 AM, Christian Froeschlin wrote:
> Looks sweet, how is it lit?

The scene is only lit with a sky_sphere; that's why it rendered so quickly.

>> For each blob all other points are tested
>
> if you really mean "all other points", you could probably
> optimize this for a large number of bubbles by sorting vertically
> in n log(n) time ... so unfortunately no bubble sort :D (*groan*).
>
> Then you only need to test points up to a maximum y distance. Of
> course such information might already be available depending how
> you generate your points in the first place.

This might just work, because the points /are/ created in vertical 
succession.

Even better yet would be Voronoi evaluation for all points, then I'd 
know the nearest neighbors. Unfortunately, Voronoi calculations for 
point sets are still beyond my capabilities :(

The biggest problem I'm having now is choosing when to subtract a 
bubble, and when not to. If a bubble resides inside another one, it 
currently subtracts that bubble. I need to maybe *add* that inside 
bubble, not subtract it.


Post a reply to this message

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