POV-Ray : Newsgroups : povray.general : Difference Small objects and Glass Cube : Re: Difference Small objects and Glass Cube Server Time
2 Aug 2024 16:27:27 EDT (-0400)
  Re: Difference Small objects and Glass Cube  
From: Mike Williams
Date: 12 Sep 2004 15:51:28
Message: <c8NLBFAPhKRBFw2T@econym.demon.co.uk>
Wasn't it andrel who wrote:
>
>
>nomail@nomail wrote:
>
>> Warp <war### [at] tagpovrayorg> wrote:
>> 
>>>Mike Williams <nos### [at] econymdemoncouk> wrote:
>>>
>>>><http://www.econym.demon.co.uk/holetut/index.htm>
>>>><http://www.econym.demon.co.uk/holetut/holes2.htm>
>>>
>>>  That's an excellent tutorial about this problem.
>>>  Perhaps worth inclusion in the Q&T site (http://tag.povray.org/povQandT/)
>>>if you are interested...
>>>
>>>--
>>>#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
>>>[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
>>>-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -
>> 
>> 
>> I read you tutorials but that is not what I want. If you can click on the
>> next link: http://www.bathsheba.com/crystalsci/lorenz/ and sow what kind of
>> picture I want to make. I also read about using glowes (MEGAPOV): or using
>> simple picture with alpha chanell..
>> Have you any other idea?
>> 
>If that is what you want, a box with a lot of bubbles as a difference is
>overkill. It will take a lot more time without changing the
>visualization compared to just adding them together. The bubbles will be
>so small that you won't notice any refraction.

If none of the bubbles touch the surface of the box, then I think you
can you can get the refractions correct by making a union of the bubbles
and giving them a material{} that's the same as the box except that the
interior ior of the bubbles is set to 1.0

In this way the surface of the bubble is the same as the surface of a
hole, and the ior of the bubble is the same as that of a hole. There are
slight differences if the interior of your glass material uses things
like fade_distance, and the shadows of the bubbles are different from
the shadows of holes. Compare the hole and bubble in this scene:-

global_settings {assumed_gamma 1.0}
camera {location  <0,3,-10> look_at 0 angle 30}
background {rgb 1}
light_source {<-30, 100, -30> color rgb 1}
                    
#include "colors.inc"                    
#include "glass.inc"

#declare MAT =  material { 
  texture {
    pigment { color Clear }
    finish { F_Glass6 }
  }
  interior { I_Glass1}
}

// A bubble
union {
  box {-1,1 material {MAT}}
  sphere {0,0.8 material {MAT interior {ior 1.0}}}
  translate -1.25*x
}  

// A hole
difference {
  box {-1,1}
  sphere {0,0.8}
  material {MAT}
  translate 1.25*x
}  

plane {y,-1 pigment {rgb 1}}





-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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