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
      - 1. Tower
      - 2. Door
      - 3. Moat
      - 4. Windows
      - 5. Extended
    - Window + Door
    - Stairs
    - Pyramid
    - Columns
    - Arch
    - Fences
    - Furnitur
    - Household
  - Engineering
                                       
 
Tower

Castle - 1. Tower

How To buildt a castle with towers, door, windows, moat and drawbridge
Objects: "cylinder", "cone", "box".
Methods: "#declare", "union", "difference".
tower plan
Tower front view.
The Construction:
For the tower with roof we take two different cones for the roof and put them up on a cylinder. The cones form the roof, because they can get through without any influence to each other.
tower
// ------ Tower ---------------------
union{
 cylinder{<0,0,0>,<0,5,0>,2
  texture{pigment{color rgb<1,1,1>}
          finish{ diffuse 0.9 phong 1}}}
 cone{<0,0,0>,2.5,<0,2.5,0>,0
      translate<0,5,0>
      texture{
          pigment{color rgb<0.4,0,0>}
          finish{ diffuse 0.9 phong 1}}}
 cone{<0,0,0>,1.8,<0,5.5,0>,0
      translate<0,5,0>
      texture{
          pigment{color rgb<0.4,0,0>}
          finish{ diffuse 0.9 phong 1}}}
}// end of union -----------------------
Click here for the scene description for POV-Ray:
".txt" file or ".pov" file

To simplify the construction and to make it more flexible to handle it is possible to declare the textures and basic constant variables and parameters by "#declare" in the head of the description.
Now the tower is declared as a new object:
//-- dimensions and textures --
#declare Walltex =
  texture{pigment{color White}
          finish {ambient 0.1
                  diffuse 0.9
                  phong 1}}
#declare Rooftex =
  texture{pigment{color rgb<0.4,0,0>}
          finish {ambient 0.1
                  diffuse 0.9
                  phong 1}}
#declare TR = 2.0;  //TowerRadius
#declare TH = 5.0;  //TowerHeight
//------------- Tower ------------
#declare Tower =  union{
cylinder {<0,0,0>,<0,TH,0>,TR
          texture{Walltex}}
cone{<0,0,0>,TR+0.5,<0,TR+0.5,0>,0
      translate<0,TH,0>
      texture{Rooftex}}
cone{<0,0,0>,TR-0.2,<0,2*TR+0.5,0>,0
      translate<0,TH,0>
      texture{Rooftex}}
}// ----- End  Tower-Definition ----
// drawing "Tower" at 4 corners:
object{ Tower translate<-6, 0,-6>}
object{ Tower translate< 6, 0,-6>}
object{ Tower translate< 6, 0, 6>}
object{ Tower translate<-6, 0, 6>}
//---------------------------------
castle towers
4 Towers.
Click here for the scene description for POV-Ray:
".txt" file or ".pov" file

continued at part 2
top

© Friedrich A. Lohmüller, 2006
www.f-lohmueller.de