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 / chair.wrl < prev    next >
Text File  |  1998-04-22  |  6KB  |  349 lines

  1. #VRML V1.0 ascii
  2.  
  3. #This chair looks so cool
  4. #It took me forever to do but I decided I needed to make
  5. #a chair myself so that I didn't have to use the
  6. #example chair from the VRML Sourcebook on my page
  7.  
  8. Coordinate3 {
  9.     point [
  10.         -4.0 0.0 1.0,
  11.         -4.0 -1.0 1.0,
  12.         -3.0 0.0 0.7,
  13.         -3.0 -1.0 0.7,
  14.         -2.0 0.0 0.35,
  15.         -2.0 -1.0 0.35,
  16.         -1.0 0.0 0.15,
  17.         -1.0 -1.0 0.15,
  18.         0.0 0.0 0.0,
  19.         0.0 -1.0 0.0,
  20.         1.0 0.0 0.15,
  21.         1.0 -1.0 0.15,
  22.         2.0 0.0 0.35,
  23.         2.0 -1.0 0.35,
  24.         3.0 0.0 0.7,
  25.         3.0 -1.0 0.7,
  26.         4.0 0.0 1.0,
  27.         4.0 -1.0 1.0,
  28.         #and now the back of the back
  29.         -4.0 0.0 0.7,
  30.         -4.0 -1.0 0.7,
  31.         -3.0 0.0 0.4,
  32.         -3.0 -1.0 0.4,
  33.         -2.0 0.0 0.05,
  34.         -2.0 -1.0 0.05,
  35.         -1.0 0.0 -0.15,
  36.         -1.0 -1.0 -0.15,
  37.         0.0 0.0 -0.3,
  38.         0.0 -1.0 -0.3,
  39.         1.0 0.0 -0.15,
  40.         1.0 -1.0 -0.15,
  41.         2.0 0.0 0.05,
  42.         2.0 -1.0 0.05,
  43.         3.0 0.0 0.4,
  44.         3.0 -1.0 0.4,
  45.         4.0 0.0 0.7,
  46.         4.0 -1.0 0.7
  47.     ]
  48. }
  49. Material {
  50.     diffuseColor 0.25 0.15 0.1
  51.     shininess 1.0
  52.     specularColor 1.0 1.0 1.0
  53. }
  54. IndexedFaceSet {
  55.     coordIndex [
  56.         0, 1, 3, 2, -1,
  57.         2, 3, 5, 4, -1,
  58.         4, 5, 7, 6, -1,
  59.         6, 7, 9, 8, -1,
  60.         8, 9, 11, 10, -1,
  61.         10, 11, 13, 12, -1,
  62.         12, 13, 15, 14, -1,
  63.         14, 15, 17, 16, -1,
  64.         #and now th back half
  65.         18, 19, 21, 20, -1,
  66.         20, 21, 23, 22, -1,
  67.         22, 23, 25, 24, -1,
  68.         24, 25, 27, 26, -1,
  69.         26, 27, 29, 28, -1,
  70.         28, 29, 31, 30, -1,
  71.         30, 31, 33, 32, -1,
  72.         32, 33, 35, 34, -1,
  73.         #and now to join up the ends
  74.         # first the two end bits
  75.         0, 1, 19, 18, -1,
  76.         16, 17, 35, 34, -1,
  77.         # and the the top pieces
  78.         0, 2, 20, 18, -1,
  79.         2, 4, 22, 20, -1,
  80.         4, 6, 24, 22, -1,
  81.         6, 8, 26, 24, -1,
  82.         8, 10, 28, 26, -1,
  83.         10, 12, 30, 28, -1,
  84.         12, 14, 32, 30, -1,
  85.         14, 16, 34, 32, -1,
  86.         # and the bottom pieces
  87.         1, 3, 21, 19, -1,
  88.         3, 5, 23, 21, -1,
  89.         5, 7, 25, 23, -1,
  90.         7, 9, 27, 25, -1,
  91.         9, 11, 29, 27, -1,
  92.         11, 13, 31, 29, -1,
  93.         13, 15, 33, 31, -1,
  94.         15, 17, 35, 33
  95.         
  96.     ]
  97. }
  98.  
  99. #Now to make the funny shaped seat
  100.  
  101. Coordinate3 {
  102.     point [
  103.         -1.5 -8.0 2.0,
  104.         -2.2 -8.0 2.3,
  105.         -2.5 -8.0 2.6,
  106.         -3.5 -8.0 6.4,
  107.         -3.25 -8.0 6.7,
  108.         -3.0 -8.0 7.0,
  109.         1.5 -8.0 2.0,
  110.         2.2 -8.0 2.3,
  111.         2.5 -8.0 2.6,
  112.         3.5 -8.0 6.4,
  113.         3.25 -8.0 6.7,
  114.         3.0 -8.0 7.0,
  115.         #The bottom half of the chair
  116.         -1.5 -8.5 2.0,
  117.         -2.2 -8.5 2.3,
  118.         -2.5 -8.5 2.6,
  119.         -3.5 -8.5 6.4,
  120.         -3.25 -8.5 6.7,
  121.         -3.0 -8.5 7.0,
  122.         1.5 -8.5 2.0,
  123.         2.2 -8.5 2.3,
  124.         2.5 -8.5 2.6,
  125.         3.5 -8.5 6.4,
  126.         3.25 -8.5 6.7,
  127.         3.0 -8.5 7.0
  128.     ]
  129. }
  130. IndexedFaceSet {
  131.     coordIndex [
  132.         0, 1, 2, -1,
  133.         2, 5, 3, -1,
  134.         3, 4, 5, -1,
  135.         6, 7, 8, -1,
  136.         8, 11, 9, -1,
  137.         9, 10, 11, -1,
  138.         0, 2, 8, 6, -1,
  139.         2, 5, 11, 8, -1,
  140.         #The bottom half of the chair
  141.         12, 13, 14, -1,
  142.         14, 17, 15, -1,
  143.         15, 16, 17, -1,
  144.         18, 19, 20, -1,
  145.         20, 23, 21, -1,
  146.         21, 22, 23, -1,
  147.         12, 14, 20, 18, -1,
  148.         14, 17, 23, 20, -1,
  149.         #And now to join the two halves together
  150.         0, 12, 13, 1, -1,
  151.         1, 13, 14, 2, -1,
  152.         2, 14, 15, 3, -1,
  153.         3, 15, 16, 4, -1,
  154.         4, 16, 17, 5, -1,
  155.         6, 18, 19, 7, -1,
  156.         7, 19, 20, 8, -1,
  157.         8, 20, 21, 9, -1,
  158.         9, 21, 22, 10, -1,
  159.         10, 22, 23, 11, -1,
  160.         5, 17, 23, 11, -1,
  161.         0, 12, 18, 6
  162.     ]
  163. }
  164. #nOW THE SEAT IS FINISHED (i hATE caps lock)
  165.  
  166. #Now for the supports between the back and the seat
  167.  
  168. Separator {
  169.     Translation {
  170.         translation 2.5 -4.2 1.225
  171.     }
  172.     MatrixTransform {
  173.         matrix    1.0 0.0 0.0 0.0
  174.             0.2 1.0 -0.25 0.0
  175.             0.0 0.0 1.0 0.0
  176.             0.0 0.0 0.0 1.0
  177.     }
  178.     Cylinder {
  179.         radius 0.2
  180.         height 7.9
  181.     }
  182.     DEF beadthing Group {
  183.         Translation {
  184.             translation 0.0 -1.5 0.0
  185.         }
  186.         Scale {
  187.             scaleFactor 1.0 2.0 1.0
  188.         }
  189.         Sphere {
  190.             radius 0.35
  191.         }
  192.         Translation {
  193.             translation 0.0 0.35 0.0
  194.         }
  195.         Scale {
  196.             scaleFactor 1.0 0.25 1.0
  197.         }
  198.         Sphere {
  199.             radius 0.35
  200.         }
  201.         Translation {
  202.             translation 0.0 -2.8 0.0
  203.         }
  204.         Sphere {
  205.             radius 0.35
  206.         }
  207.     }
  208. }
  209. Separator {
  210.     Translation {
  211.         translation -2.5 -4.2 1.225
  212.     }
  213.     MatrixTransform {
  214.         matrix    1.0 0.0 0.0 0.0
  215.             -0.2 1.0 -0.25 0.0
  216.             0.0 0.0 1.0 0.0
  217.             0.0 0.0 0.0 1.0
  218.     }
  219.     Cylinder {
  220.         radius 0.2
  221.         height 7.9
  222.     }
  223.     USE beadthing
  224. }
  225. Separator {
  226.     Translation {
  227.         translation 1.25 -4.2 1.0
  228.     }
  229.     MatrixTransform {
  230.         matrix    1.0 0.0 0.0 0.0
  231.             0.1 1.0 -0.315 0.0
  232.             0.0 0.0 1.0 0.0
  233.             0.0 0.0 0.0 1.0
  234.     }
  235.     Cylinder {
  236.         radius 0.2
  237.         height 7.9
  238.     }
  239.     USE beadthing
  240. }
  241. Separator {
  242.     Translation {
  243.         translation -1.25 -4.2 1.0
  244.     }
  245.     MatrixTransform {
  246.         matrix    1.0 0.0 0.0 0.0
  247.             -0.1 1.0 -0.315 0.0
  248.             0.0 0.0 1.0 0.0
  249.             0.0 0.0 0.0 1.0
  250.     }
  251.     Cylinder {
  252.         radius 0.2
  253.         height 7.9
  254.     }
  255.     USE beadthing
  256. }
  257. Separator {
  258.     Translation {
  259.         translation 0.0 -4.2 0.8
  260.     }
  261.     MatrixTransform {
  262.         matrix     1.0 0.0 0.0 0.0
  263.             0.0 1.0 -0.35 0.0
  264.             0.0 0.0 1.0 0.0
  265.             0.0 0.0 0.0 1.0
  266.     }
  267.     Cylinder {
  268.         radius 0.2
  269.         height 7.9
  270.     }
  271.     USE beadthing
  272. }
  273.  
  274. #And now for the legs (I'm not lookng forward to this)
  275.  
  276. Separator {
  277.     Translation {
  278.         translation 3.25 -12.1 7.5
  279.     }
  280.     DEF leg Separator {
  281.         MatrixTransform {
  282.             matrix    1.0 0.0 0.0 0.0
  283.                 -0.2 1.0 -0.25 0.0
  284.                 0.0 0.0 1.0 0.0
  285.                 0.0 0.0 0.0 1.0
  286.         }
  287.         Cylinder {
  288.             radius 0.3
  289.             height 8.0
  290.         }
  291.         Scale {
  292.             scaleFactor 1.0 2.0 1.0
  293.         }
  294.         Sphere {
  295.             radius 0.5
  296.         }
  297.         Translation {
  298.             translation 0.0 0.5 0.0
  299.         }
  300.         Scale {
  301.             scaleFactor 1.0 0.25 1.0
  302.         }
  303.         Sphere {
  304.             radius 0.5
  305.         }
  306.         Translation {
  307.             translation 0.0 -4.0 0.0
  308.         }
  309.         Sphere {
  310.             radius 0.5
  311.         }
  312.     }
  313. }
  314. Separator {
  315.     Translation {
  316.         translation -3.25 -12.1 7.5
  317.     }
  318.     MatrixTransform {
  319.         matrix     1.0 0.0 0.0 0.0
  320.             0.4 1.0 0.0 0.0
  321.             0.0 0.0 1.0 0.0
  322.             0.0 0.0 0.0 1.0
  323.     }
  324.     USE leg
  325. }
  326. Separator {
  327.     Translation {
  328.         translation 2.75 -12.1 1.5
  329.     }
  330.     Rotation {
  331.         rotation 0.0 1.0 0.0 3.142
  332.     }
  333.     MatrixTransform {
  334.         matrix    1.0 0.0 0.0 0.0
  335.             0.4 1.0 0.0 0.0
  336.             0.0 0.0 1.0 0.0
  337.             0.0 0.0 0.0 1.0
  338.     }
  339.     USE leg
  340. }
  341. Separator {
  342.     Translation {
  343.         translation -2.75 -12.1 1.5
  344.     }
  345.     Rotation {
  346.         rotation 0.0 1.0 0.0 3.142
  347.     }
  348.     USE leg
  349. }