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
    - Stairs
      - Stair
     ; - Winding Stair
    - Pyramid
    - Columns
    - Arch
    - Fences
    - Furnitur
    - Household
  - Engineering
                                       
 
winding stair

Winding Staircase

Example for the use of a while loop
Objects: "plane", "box"
Methods: "#declare", "union", "while", "intersection", "bounded_by".
Click here for an example!

The shape of the steps is made by an intersection ("intersection") of a rectangular parallelepiped ("box") with two turned planes ("plane"). The stair is made by a while loop.

Top view: the principle of a step segment
//----------- Dimensionen ---------------
#declare StH = 0.10; // Stepheight
#declare StT = 0.50; // Stepdeapth, max.
#declare StB = 1.20; // StepWide
#declare StI = 0.40; // StepInnerRadius
#declare StAnz = 40; // Number of Steps
#declare A = 360/20; // Step rotation angle
//---------------------------------------
Here is a little trick to create
"shadow differenciated colors"
which look the same in the sunshine:
//----------------------Textures
#declare Stex1 =
 texture{ pigment{color White}
          finish {diffuse 0.85}}
#declare Stex2 =
 texture{ pigment{color White}
          finish {diffuse 0.90}}
#declare Step = //-------------
intersection{
box  {<0,0,-StT>,< StB,StH,StT>
      translate<StI,0,0>
      texture{Stex1}}
plane{<0,0, 1>,0 rotate<0,-W/2,0>
      translate<0,0,0.01>
      texture{Stex2}}
plane{<0,0,-1>,0 rotate<0, W/2,0>
      translate<0,0,0.0 >
      texture{Stex2}}
bounded_by{
 box{<0,0,-StT>,<StB,StH,StT>
     translate<StI,0,0>}}
}//-------------- end of Step
Winding Staircase  394x480
Scene file for POV-Ray:
"povwend.txt"
or "povwend.pov"
-------- Construction and Drawing of the Winding Staircase --------
union{
//------------------------- #while - loop --------------------
#declare Nr = 0;    // sets counter Nr on start value
#while (Nr<StAnz)  // check if end value is reached
   object{Step    // Object depending from counter Nr
              translate<0,Nr*StH,0>
              rotate <0,-Nr*A,0>}
#declare Nr = Nr+1; // increase counter by 1
#end               // end of the sector to repeat
//----------------------------------------------------------------
rotate<0,90,0> }
//------------------------------------------------------------ end
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