POV-Ray : Newsgroups : povray.advanced-users : Mesh with interior? : Re: Mesh with interior? Server Time
29 Jul 2024 14:14:30 EDT (-0400)
  Re: Mesh with interior?  
From: Warp
Date: 28 Feb 2002 16:06:16
Message: <3c7e9bc8@news.povray.org>

> I don't see that the mesh is having refractive properties, that is, it
> doesn't "distort" the image behind the object.

  I do.
  Here is an example:

----------8<-----------8<-------------8<--------------8<----------8<------
camera { location <-1,2,-5> look_at 0 angle 35 }
light_source { <100,200,-150>, 1 }
plane { y,-1 pigment { checker rgb 1, rgb .5 } }

mesh
{ #declare Ind1 = 0;
  #while(Ind1 < 30)
    #declare Ang1_1 = 360*Ind1/30;
    #declare Ang1_2 = 360*(Ind1+1)/30;
    #declare Ind2 = 0;
    #while(Ind2 < 60)
      #declare Ang2_1 = 360*Ind2/60;
      #declare Ang2_2 = 360*(Ind2+1)/60;
      #declare P1 = vrotate(y, <Ang1_1, Ang2_1>);
      #declare P2 = vrotate(y, <Ang1_1, Ang2_2>);
      #declare P3 = vrotate(y, <Ang1_2, Ang2_1>);
      #declare P4 = vrotate(y, <Ang1_2, Ang2_2>);
      smooth_triangle { P1,P1, P2,P2, P3,P3 }
      smooth_triangle { P2,P2, P3,P3, P4,P4 }
      #declare Ind2 = Ind2+1;
    #end
    #declare Ind1 = Ind1+1;
  #end
  
  pigment { rgbf <1,1,1,.95> }
  finish { specular 1 roughness .01}
  interior { ior 1.5 }
}
----------8<-----------8<-------------8<--------------8<----------8<------

-- 
#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 -


Post a reply to this message

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