POV-Ray : Newsgroups : povray.advanced-users : Interference in media : Re: Interference in media Server Time
5 Jul 2024 15:14:43 EDT (-0400)
  Re: Interference in media  
From: Alain
Date: 1 Feb 2008 14:09:22
Message: <47a36e62$1@news.povray.org>
Timothy Groves nous apporta ses lumieres en ce 2008/02/01 06:17:
> I've been trying to generate a warp-field type effect, and whenever the 
> two spheres containing the media intersect, unpleasant things happen.
> 
> I've tried both a union and a merge of the two spheres, but the results 
> are the same.  And equally poor either way.
> 
> I'll attach a code snippet and a picture of the problem.
> 
> Any suggestions on how to fix it?
> 
> 
> #declare cherenkov_radiation = sphere {
>     <0, 0, 0>, 1
>     hollow
>     pigment {
>         rgbf 1
>         }
>     interior {
>         media {
>             emission rgb 1
>             absorption rgb <0, 0, 0.5>           
>             density {
>                 spherical
>                 color_map {
>                     [0 rgb 0]
>                     [0.25 rgb <0, 0.0005, 0.001>]
>                     [0.5 rgb <0, 0.001, 0.002>]
>                     [0.75 rgb <0.001, 0.002, 0.002>]
>                     [1 rgb 0]
>                     }
>                 }
>             }
>         }
>     }
>     
> 
> union {
>     object {
>         kepler // The Starship Model
>         }
>     #if (c_size > 0)
>         merge {
>             object {
>                 cherenkov_radiation
>                 scale <70, 70, 2000>
>                 translate <65, 15, -54>
>                 }
>             object {
>                 cherenkov_radiation
>                 scale <70, 70, 2000>
>                 translate <-65, 15, -54>
>                 }
>             }
>     #end
>     translate loc
>     }
> 
> ------------------------------------------------------------------------
> 
I'd use a flatened sphere just large enough to completely contain the two medias.
The render time will be somewhat longer, but emissive media is prety fast.

-- 
Alain
-------------------------------------------------
You know you've been raytracing too long when you can no longer tell the 
difference between the top raytracing book and the "Raytracing for Dummies" 
book. To you, they're both hopelessly uninformed.
     -- Taps a.k.a. Tapio Vocadlo


Post a reply to this message

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