home *** CD-ROM | disk | FTP | other *** search
/ Serif Graphics Collection / Serif_Graphics_Collection_6_DTP_Porgrams_on_One_CD_Serif-SPF.iso / 3DPLUS / data1.cab / VRML / lamp2.wrl < prev    next >
Text File  |  1998-04-22  |  3KB  |  224 lines

  1. #VRML V1.0 ascii
  2.  
  3. #This is a kind of modern lamp again from an IKEA catalogue
  4. #This is version number 2!
  5. #Instead of a cone for a lamp shade this one
  6. #has fully fledged co-ordinate made lamp shade
  7. #It even has material binding
  8.  
  9. #This is the aluminium material used in the VRML Sourcebook
  10. Material {
  11.     diffuseColor 0.3 0.3 0.5
  12.     specularColor 0.7 0.7 0.8
  13.     ambientColor 0.3 0.3 0.35
  14.     shininess 0.09
  15. }
  16. Separator {
  17.     Scale {
  18.         scaleFactor 1 0.1 1
  19.     }
  20.     Sphere {
  21.     }
  22. }
  23. Translation {
  24.     translation 0 0.25 0
  25. }
  26. Cylinder {
  27.     height 0.5
  28.     radius 0.12
  29. }
  30. Translation {
  31.     translation 0 0.25 0
  32. }
  33. Cylinder {
  34.     height 1
  35.     radius 0.08
  36. }
  37. Translation {
  38.     translation -0.07 0.65 0
  39. }
  40. Rotation {
  41.     rotation 0 0 1 0.4
  42. }
  43. Cylinder {
  44.     radius 0.08
  45.     height 0.4
  46. }
  47. Rotation {
  48.     rotation 0 0 1 -0.8
  49. }
  50. Translation {
  51.     translation -0.13 0.39 0
  52. }
  53. Cylinder {
  54.     radius 0.08
  55.     height 0.6
  56. }
  57. Rotation {
  58.     rotation 0 0 1 0.8
  59. }
  60. Translation {
  61.     translation 0.19 0.40 0
  62. }
  63. Cylinder {
  64.     radius 0.08
  65.     height 0.5
  66. }
  67. Rotation {
  68.     rotation 0 0 1 -0.8
  69. }
  70. Translation {
  71.     translation -0.16 0.27 0
  72. }
  73. Cylinder {
  74.     radius 0.08
  75.     height 0.3
  76. }
  77. Rotation {
  78.     rotation 0 0 1 0.4
  79. }
  80. Translation {
  81.     translation 0.05 0.26 0
  82. }
  83. Cylinder {
  84.     radius 0.08
  85.     height 0.3
  86. }
  87. Translation {
  88.     translation 0 0.1 0
  89. }
  90. Rotation {
  91.     rotation 1 0 0 3.142
  92. }
  93. Cone {
  94.     bottomRadius 0.15625
  95.     height 0.2
  96. }
  97. Translation {
  98.     translation 0 -0.55 0
  99. }
  100. Material {
  101.     diffuseColor 0.85 0.85 0.75
  102.     ambientColor 0.95 0.95 0.95
  103.     specularColor 1.0 1.0 1.0
  104.     shininess 0.15
  105.     transparency 0.01
  106.     emissiveColor 0.9 0.9 0.85
  107. }
  108. Sphere {
  109.     radius 0.25
  110. }
  111. Translation {
  112.     translation 0.0 0.3125 0.0
  113. }
  114. Cylinder {
  115.     radius 0.15625
  116.     height 0.3125
  117. }
  118. Material {
  119.     diffuseColor 1 0 1
  120.     shininess 0.03
  121.     specularColor 1 0.2 1
  122.     ambientColor 0.8 0.01 0.75
  123. }
  124. Translation {
  125.     translation 0 -1 0
  126. }
  127. Rotation {
  128.     rotation 1 0 0 -3.142
  129. }
  130. Separator {
  131. Scale {
  132.     scaleFactor 0.12 0.15 0.12
  133. }
  134. Coordinate3 {
  135.     point[
  136.         3 0 0,
  137.         2.8 0 1,
  138.         2.2 0 2.2,
  139.         1 0 2.8,
  140.         0 0 3,
  141.         -1 0 2.8,
  142.         -2.2 0 2.2,
  143.         -2.8 0 1,
  144.         -3 0 0,
  145.         -2.8 0 -1,
  146.         -2.2 0 -2.2,
  147.         -1 0 -2.8,
  148.         0 0 -3,
  149.         1 0 -2.8,
  150.         2.2 0 -2.2,
  151.         2.8 0 -1,
  152.         #The bottom ring
  153.         6 -10 0,
  154.         5.6 -10 2,
  155.         4.4 -10 4.4,
  156.         2 -10 5.6,
  157.         0 -10 6,
  158.         -2 -10 5.6,
  159.         -4.4 -10 4.4,
  160.         -5.6 -10 2,
  161.         -6 -10 0,
  162.         -5.6 -10 -2,
  163.         -4.4 -10 -4.4,
  164.         -2 -10 -5.6,
  165.         0 -10 -6,
  166.         2 -10 -5.6,
  167.         4.4 -10 -4.4,
  168.         5.6 -10 -2
  169.     ]
  170. }
  171.  
  172. #Wanna change the colours or the lamp shade around? 
  173. #This ere is where to do it
  174. Material {
  175.     diffuseColor [
  176.         1 0.7960784 0.5490196,
  177.         1 0.5686274 0.3568627,
  178.     ]
  179. }
  180. MaterialBinding {
  181.     value PER_VERTEX_INDEXED
  182. }
  183.  
  184. #Yes, this lamp shade is floating in mid-air, so what?
  185. IndexedFaceSet {
  186.     coordIndex [
  187.         1, 17, 16, 0, -1,
  188.         2, 18, 17, 1, -1,
  189.         3, 19, 18, 2, -1,
  190.         4, 20, 19, 3, -1,
  191.         5, 21, 20, 4, -1,
  192.         6, 22, 21, 5, -1,
  193.         7, 23, 22, 6, -1,
  194.         8, 24, 23, 7, -1,
  195.         9, 25, 24, 8, -1,
  196.         10, 26, 25, 9, -1,
  197.         11, 27, 26, 10, -1,
  198.         12, 28, 27, 11, -1,
  199.         13, 29, 28, 12, -1,
  200.         14, 30, 29, 13, -1,
  201.         15, 31, 30, 14, -1,
  202.         0, 16, 31, 15
  203.         
  204.     ]
  205.     materialIndex [
  206.         0, 1, 1, 0, 0,
  207.         0, 1, 1, 0, 0,
  208.         0, 1, 1, 0, 0,
  209.         0, 1, 1, 0, 0,
  210.         0, 1, 1, 0, 0,
  211.         0, 1, 1, 0, 0,
  212.         0, 1, 1, 0, 0,
  213.         0, 1, 1, 0, 0,
  214.         0, 1, 1, 0, 0,
  215.         0, 1, 1, 0, 0,
  216.         0, 1, 1, 0, 0,
  217.         0, 1, 1, 0, 0,
  218.         0, 1, 1, 0, 0,
  219.         0, 1, 1, 0, 0,
  220.         0, 1, 1, 0, 0,
  221.         0, 1, 1, 0
  222.     ]
  223. }
  224. }