home *** CD-ROM | disk | FTP | other *** search
/ Computerspiele Selbermachen / computerspieleselbermachen.iso / arch / archtect.inc next >
Text File  |  1994-09-21  |  26KB  |  514 lines

  1. // archtect.inc
  2. // POV-Ray 2.0 include file
  3. // Simple architectural, crystal & related shapes
  4. // Michael G. Wilkins 9/1994.
  5. //------------------------ARCHITECTURAL SHAPES------------------------------
  6. /*      Objects declared (some components also declared):
  7.                 Column6 - 6-fluted simple column diameter 2
  8.                 Column8 - 8-fluted simple column diameter 2
  9.                 SimplePlinth - simple box plinth proportioned
  10.                         for diameter 2 columns
  11.                 DoricCol - 20-flute Doric column diameter 2
  12.                 IonicCol - 10-flute Ionic column diameter 2
  13.                 Hex - basic hexagon, centered on origin in XZ plane,
  14.                       unit sides, height Y = 0.0 to 1.0. Use for
  15.                       flagstones, etc. Grout cutback included (place
  16.                       over a Gray30 surface, etc).
  17.                 HexCorner - piece of hexagon for corners of hexagonal
  18.                       tesselations.
  19.                 DoricPlinth - Doric column plinth for diameter 2 column
  20.                 DoricPlinthA - simple plinth for diameter 2 column
  21.                 DoricPlinthH - hexagonal-based Doric plinth
  22.                 DoricCap - Doric column capital for diameter 2 column
  23.                 DoricCapH - Doric column capital with hexagonal top
  24.                 IonicPlinth - Ionic column plinth for diameter 2 column
  25.                 IonicCap - Ionic column capital for diameter 2 column
  26.                         (not yet implemented)
  27.                 Bric - basic buiding block with all edges chamfered
  28.                         for shadows in joints in walls. 1 x 1 in
  29.                         YZ plane, 0.0 to tau in X.
  30.                 HalfBrick - half the above, in length.
  31.                 EllArch - elliptic arch, from -12. to 12. in X, height
  32.                         from Y = 0. to 12./tau, in XY plane. Thickness
  33.                         is approx 1. in XY and YZ planes.
  34. REMARKS
  35.         Column objects oriented along Y axis, from -1 to +1, with unit 
  36. radius (or equivalent). Details of Doric & Ionic are from "The Modern 
  37. Builder's Guide", M. Lafever, pub. by Dover NY 1969, being a reprint of the 
  38. original 1833 edition, and are typical of American Greek Revival construction 
  39. from the last century, rather than the original pure Greek, even though there 
  40. are details of 'original' Greek structures.  For large classical columns, the 
  41. columns should really be cones, the upper diameter being about 1/6th less 
  42. than the lower.  Further, the larger Egyptian columns had a height to 
  43. diameter ratio of about 4.5; the Athenians pushed this to about 5 or so, the 
  44. Romans up to a ratio of 7 or so.  The Povians can use any ratio!
  45.         For high-resolution or closeup views, turn on the 'sturm' keyword in
  46. all torus objects, use the +A and Q9 switches.
  47.         WARNING: be careful scaling plinths, capitals and archs. You cannot
  48. scale these in Z as much as in X and Y, or you lose the proportions.  Scale 
  49. and place the plinths and capitals first, then scale the columns to the 
  50. required height.  Note that my proportions are loosely based on tau, the
  51. Golden Mean, as are a lot of classical Greek proportions.
  52.         Feel free to modify, add to, and elaborate, just please send me a 
  53. copy of your efforts, and any images that incorporate these objects, or  
  54. modifications thereof. The classic Corinthian capital is going to be rather 
  55. difficult, as are some of the ornamentations for architraves and friezes, 
  56. etc - laurel leaves, medallions, rosettes, etc.   Moray, PovCAD or a similar 
  57. wireframe  modeller is probably the way to go.
  58.         I can be reached on:
  59.         Compuserve: [73042,1022], often on the GRAPHDEV Forum.
  60.         Internet: wilkins@bootes.unm.edu  (a Bitnet address).
  61.  
  62. //------------------------------CRYSTAL SHAPES------------------------------
  63.  
  64.                    Hexagon_Y    ;hexagonal prism, 2 flat caps
  65.                    Hexagon_Y_TopCap   ; hex prism, 1 pointed top cap
  66.                    Hexagon_Y_Point; hex prism with top pointed cap
  67.                    Prism_Y      ;prism, 2 flat caps
  68.                    Prism_TopCap  ;top pointed cap for triangular prism
  69.                    Prism_Y_Point, prism with 1 pointed cap
  70.                    Octagon_Y   ;octagonal prism, 2 flat caps
  71.                    Octagon_TopCap  ;pointed top cap for octagon prism
  72.                    Octagon_Y_Point; octagonal prism with pointed end
  73.  
  74. REMARKS.
  75.         Base of all objects is at y=-1, all oriented up +y axis, with a
  76. flat end. Other end shapes can be made by slicing with a plane at an angle, 
  77. etc.
  78.          Scale prism and cap separately in Y before applying cap, to preserve 
  79. the desired end proportions. Scale cap and prism together in X & Z.
  80.         Please see ARCHIMED.INC by Grant Hutchinson [100047,144], available  
  81. on the CIS GRAPHDEV forum.  This is a very nice collection of the Archimedean 
  82. solids.
  83.         For those who want to do more here, a brief note.  There are 75 
  84. uniform polyhedra (regular faces and congruent vertices, including star
  85. polygons), as well as two infinite families of prisms and antiprisms. These
  86. have been generated and raytraced by Maeder, see The Mathematica Journal,
  87. Vol 4, #2, Spring 1994. A Mathematica package is available for enumerating
  88. these uniform polyhedra; (the same issue also has an article on nonperiodic 
  89. plane tilings).  There is also a Mathematica package by Maeder for
  90. enumerating all the 59 stellations of the icosahedron.  Lots of interesting
  91. strange shapes for POV-people!
  92.  
  93. */
  94. #include "shapes.inc"
  95. #include "colors.inc"
  96. #include "textures.inc"
  97. #include "fov.inc"
  98. #declare pi = 3.14159
  99. #declare tau = 1.61803   //Golden mean
  100. #declare nu = 137.5      //Fibonacci angle, 360/tau^2
  101.  
  102. #declare Column =  cylinder { <0.,-1.,0.>, <0.,1.,0.>, 1. }  //2 dia 
  103.                   
  104. //-----------------------SIMPLE FLUTED COLUMNS----------------------------
  105. //For a 6-flute column, your stone chisel
  106. #declare Flute6 = cylinder { <0.,-1.,0.>, <0.,1.,0.>, pi/12. 
  107.                    translate <0.,0.,-1.> }
  108. // and for a 8-flute column                 
  109. #declare Flute8 = cylinder { <0.,-1.,0.>, <0.,1.,0.>, pi/16.
  110.                    translate <0.,0.,-1.> }
  111. //
  112. #declare BaseCol61 = object {
  113.          union {
  114.                 object { Column }
  115.                 object { Flute6 }
  116.                 object { Flute6 rotate y*60 }
  117.                 object { Flute6 rotate y*120 }
  118.                 object { Flute6 rotate y*180 }
  119.                 object { Flute6 rotate y*240 }
  120.                 object { Flute6 rotate y*300 }
  121.                 }
  122.           }
  123. #declare Column6 = object {
  124.         difference {
  125.                 object { BaseCol61 }
  126.                 object { Flute6 rotate y*30 }
  127.                 object { Flute6 rotate y*90 }
  128.                 object { Flute6 rotate y*150 }
  129.                 object { Flute6 rotate y*210 }
  130.                 object { Flute6 rotate y*270 }
  131.                 object { Flute6 rotate y*330 }
  132.                 }
  133.        bounded_by { box { <-1.27, -1.1, -1.27>, < 1.27, 1.1, 1.27> }  }
  134. }
  135.  
  136. #declare BaseCol81 = object {
  137.          union {
  138.                 object { Column }
  139.                 object { Flute8 }
  140.                 object { Flute8 rotate y*45 }
  141.                 object { Flute8 rotate y*90 }
  142.                 object { Flute8 rotate y*135 }
  143.                 object { Flute8 rotate y*180 }
  144.                 object { Flute8 rotate y*225 }
  145.                 object { Flute8 rotate y*270 }
  146.                 object { Flute8 rotate y*315 }
  147.                 }
  148.           }
  149. #declare Column8 = object {
  150.         difference {
  151.                 object { BaseCol81 }
  152.                 object { Flute8 rotate y*22.5 }
  153.                 object { Flute8 rotate y*67.5 }
  154.                 object { Flute8 rotate y*112.5 }
  155.                 object { Flute8 rotate y*157.5 }
  156.                 object { Flute8 rotate y*202.5 }
  157.                 object { Flute8 rotate y*247.5 }
  158.                 object { Flute8 rotate y*292.5 }
  159.                 object { Flute8 rotate y*337.5 }
  160.                 }
  161.        bounded_by { box { <-1.21, -1.1, -1.21>, < 1.21,