POV-Ray : Newsgroups : povray.binaries.images : Transition between two medias : Re: Transition between two medias Server Time
30 Jul 2024 08:19:22 EDT (-0400)
  Re: Transition between two medias  
From: Le Forgeron
Date: 24 Apr 2012 05:16:00
Message: <4f966f50$1@news.povray.org>
Le 24/04/2012 09:25, Thomas de Groot a écrit :
> I am struggling with the following. Muddy water flowing out of an
> estuary towards sea, eventually sinks down/mixes with sea water some
> distance from the coast. The easy approach is shown in the image below:
> two boxes, sliced by a plane, and filled with two different media each
> (one absorption, one scattering).
> 
> I would prefer a more diffuse approach using a spherical pattern for
> instance, but I am unable to come up with a working code that can do
> that properly.
> 
> Any idea? Thanks!

two words: Offset printing.

(in 3D)

It might be costly. Macro is a must have.

In details, use union/merge of spheres with fixed coordinates but
variables radius.

In the estuary, radius are such that spheres fills the whole space.

In the least yet perturbed sea, the radius become very small.

For sphere placements, use ABC or ABA compact spheres filling of space
(12 spheres around 1: 6 in same plane, 3 above, 3 below), rather than
cartesian grid. Tilt the placements by some rotations.

relative radius of spheres should be computed from the x,y position of
the center (you might also consider z if you like), relative your
gradient/pattern of diffusion between 100% estuary and the 100% sea.

To sum up:
 1. create that object A (limit the spheres to the mixing zone).
 2. create an object B, container of the mix.
 3. B is filled with sea media
 4. intersection of B & A is filled with estuary media.
 5. part before B in estuary is filled with estuary media
 6. part after B in sea is filled with sea media
(there might be a surface between 5/6 and B, so might be A and B must be
extended to one fill further in their direction)

(B is the whole flow, A is a squatter)
alternative with possible coincident surface issue:

difference { B A material{ Sea } }
intersection { B A material { Estuary } }

Tuning with the radius between the spheres coordinates.

-- 
Real software engineers work from 9 to 5, because that is
the way the job is described in the formal spec.  Working
late would feel like using an undocumented external procedure.


Post a reply to this message

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