Descriptions and Examples for the POV-Ray Raytracer by Friedrich A. Lohmüller
    POV-Ray Examples - How To Make Objects for POV-Ray
Italiano Italiano
Français français
Deutsch Deutsch

Home
- POV-Ray Tutorial
  - POV-Ray Examples
   Index of Content
  - Geometry
  - Architecture
    - House
    - Roof
    - Tower
    - Castle
    - Window + Door
        - Window
        - Door
        - Shoji
        - Paravent
    - Stairs
    - Pyramid
    - Columns
    - Arch
    - Fences
    - Furnitur
    - Household
  - Engineering
                                       
 
Window

Window

Objects: "box"
Methods: "difference", "union", "#declare"
The construction in details:
The frame of the window first is formed by a difference of a flat box in the size of the outlines minus some boxes in the size of the openings for the glass. The result of that difference gets the colour of the window frame. Then a flat box with a glass texture is added by a union statement.
It's not necessary to use a glass material (with a defined glass ior and real refraction) if we want to have a simple window glass. Using glass material only slows down the speed of the rendering - at a thin window glass refraction gives no visible effect!
An include file to use this object as a read-made object you can find at my POV-Ray Objects page.
The Plan:
Front view (Looking in positive z direction)
//---------------- Window ------------------
#declare Window_Texture =
  texture{ pigment{ color White}
           finish { ambient 0.9 phong 0.5}
         } // end of texture
//------------------------------------------
#declare Window =
union{
 difference{
  box{<-0.50,0.80,-0.02>,< 0.50,1.80,0.02>}
  box{<-0.45,0.85,-0.03>,<-0.03,1.27,0.03>}
  box{< 0.03,0.85,-0.03>,< 0.45,1.27,0.03>}
  box{<-0.45,1.33,-0.03>,<-0.03,1.75,0.03>}
  box{< 0.03,1.33,-0.03>,< 0.45,1.75,0.03>}
  texture{ Window_Texture }
  } // --- end of difference
 box{<-0.49,0.81,0.0>,< 0.49,1.79,0.001>
     texture{ T_Glass3 } // without ior !!!
     } // end of box
 } // --- end of union
// Attention: avoid coincident surfaces!!
//------- end of window definition ------

//Draw the window:
object{Window translate<0,0,0>}
//------------------------------------- end
The jellow boxes where subtracted from the white box!
 
This makes to following image:
Window
Click here for the complete scene description
for POV-Ray: ".txt" file or ".pov" file
Ready-made POV-Ray objects as
include files and example files you'll find
at the POV-Ray Objects Page
top

© Friedrich A. Lohmüller, 2012
www.f-lohmueller.de
 
Visitors:
(since May-1999)
Thanks for your visit!