Chris Pollett > Students >
Michelle Yuan

    ( Print View )

    [Bio]

    [CS297Proposal]

    [Del1]

    [Del2]

    [Del3]

    [CS297Report]

    [CS298Proposal]

    [CS298Presentation]

    [CS298Report]

                           

























Michelle Yuan's VRML Appartment

To see this demo you need a VRML viewer for your Browser. The one I used was: Cortona.

The first project deliverable - my VRML appartment

VRML Source

#apt.wrl

#VRML V2.0 utf8

Group {
   children [

    Transform {
	      scale 0.7 0.5 20.0
          children DEF House Inline {
             url "houseArch.wrl"
          }
    },


	#Back Wall
	Transform {
	      translation 0.0 0.5 -3.0
	      children DEF Wall Shape {
		      appearance DEF White Appearance {
				 material Material {
				   diffuseColor 0.5 0.5 0.5
				 }
			  }
	          geometry Box {
	             size 5.5 2.0 0.03
	          }
	      }
	    },


   # Front Triangle on top
	Transform {
	      translation 0.0 1.5 3.05
	   	  scale 1.0 0.4 0.001
	      children DEF Ft1 Inline {
	          url "t1.wrl"
	      }
	},

   # Back Triangle on top
	Transform {
	      translation 0.0 1.5 -3.02
	      scale 1.0 0.4 1.0
	      rotation 0.0 1.0 0.0 3.142
	      children USE Ft1
	},


	Transform {
	      translation -2.0 1.3 -0.5
	   	  scale 0.1 0.1 0.1
	      children DEF Vase Inline {
	          url "bulb.wrl"
	      }
	},


	Transform {
	      translation -2.0 -0.5 0.0
	   	  scale 0.5 0.5 0.5
	      children DEF  Table Inline {
	          url "roundTable.wrl"
	      }
	},


    # ---- Three chairs around table
	Transform {
	      translation -2.0 -0.5 -0.5
	   	  scale 0.5 0.5 0.5
	      children DEF  Table Inline {
	          url "chair.wrl"
	      }
	},
	Transform {
	      translation -2.2 -0.5 0.5
	   	  scale 0.5 0.5 0.5
	   	  rotation 0.0 1.0 0.0 1.571
	      children DEF  Table Inline {
	          url "chair.wrl"
	      }
	},
	Transform {
	      translation -1.6 -0.5 0.5
	   	  scale 0.5 0.5 0.5
	   	  rotation 0.0 1.0 0.0 -1.571
	      children DEF  Table Inline {
	          url "chair.wrl"
	      }
	},


	Transform {
	      translation 2.25 -0.5 -2.0
	   	  scale 0.05 0.2 0.1
	      children DEF Vase Inline {
	           url "vase.wrl"
	      }
	},

    # --- Bed
	Transform {
	      translation 0.0 -0.7 -1.0
	      scale 0.5 0.25 0.5
	      children DEF Vase Inline {
	          url "bed.wrl"
	      }
	},


	Transform {
	      translation 2.3 -0.25 -0.5
	      rotation 0.0 1.0 0.0 -1.571
	      children DEF Vase Inline {
	          url "desk.wrl"
	      }
	}




   ]
}

# bed.wrl

#VRML V2.0 utf8

Group {
	children [

     # Back

      # bottom
      Transform {
         translation 0.0 1.1 0.0
         rotation 1.0 0.0 0.0 1.571
         children Shape {
            appearance Appearance {
               material Material {
                  diffuseColor 0.5 0.0 0.5
               }
            }
            geometry Box {
               size 2.6 3.0 1.0
            }
         }
      }




   ]
}

#bulb.wrl modified from VRML sourcebook

#VRML V2.0 utf8

Group {
	children [
	# Dark gray light bulb hanging wire
		Shape {
			appearance Appearance {
				material Material {
					diffuseColor 0.4 0.4 0.4
				}
			}
			geometry Cylinder {
				radius 0.05
				height 2.0
			}
		},
	# Yellowish light bulb socket
		Transform {
			translation 0.0 -1.0 0.0
			children Shape {
				appearance Appearance {
					material Material {
					diffuseColor 1.0 1.0 0.4
					}
				}
				geometry Sphere { radius 0.5 }
			}
		},
		Transform {
			translation 0.0 -1.5 0.0
			children Shape {
				appearance Appearance {
					material Material {
						diffuseColor 1.0 1.0 0.4
					}
				}
				geometry Cylinder {
					radius 0.5
					height 1.0
				}
			}
		},
	# White light bulb
		Transform {
			translation 0.0 -2.95 0.0
			children Shape {
				appearance Appearance {
					material Material {
						diffuseColor  1.0 1.0 1.0
						emissiveColor 1.0 1.0 1.0
					}
				}
				geometry Sphere { }
			}
		}
	]
}

#chair.wrl

#VRML V2.0 utf8

Group {
	children [
        #chair back
		Transform {
		   translation 0.0 0.4 -0.1
		   rotation 1.0 0.0 0.0 -1.571
		   scale 0.5 1.0 1.0
		   children Shape {
			  appearance Appearance {
				 material Material {
					diffuseColor 0.5 0.25 1.0
				 }
			  }
			  geometry Cylinder {
				radius 0.25
				height 0.01
			  }
		   }
		},


		Transform {
		   translation 0.0 0.15 0.0
		   children Shape {
			  appearance Appearance {
				 material Material {
					diffuseColor 0.5 0.25 1.0
				 }
			  }
			  geometry Cylinder {
				radius 0.15
				height 0.05
			  }
		   }
		},


        # Legs
		Transform {
		   translation -0.1 0.0 -0.1
		   children Shape {
			  appearance Appearance {
				 material Material {
					diffuseColor 0.5 0.25 1.0
				 }
			  }
			  geometry Cylinder {
				radius 0.01
				height 0.25
			  }
		   }
		},

		Transform {
		   translation 0.1 0.0 0.1
		   children Shape {
			  appearance Appearance {
				 material Material {
					diffuseColor 0.5 0.25 1.0
				 }
			  }
			  geometry Cylinder {
				radius 0.01
				height 0.25
			  }
		   }
		},

		Transform {
		   translation 0.1 0.0 -0.1
		   children Shape {
			  appearance Appearance {
				 material Material {
					diffuseColor 0.5 0.25 1.0
				 }
			  }
			  geometry Cylinder {
				radius 0.01
				height 0.25
			  }
		   }
		},


		Transform {
		   translation -0.1 0.0 0.1
		   children Shape {
			  appearance Appearance {
				 material Material {
					diffuseColor 0.5 0.25 1.0
				 }
			  }
			  geometry Cylinder {
				radius 0.01
				height 0.25
			  }
		   }
		}

	]
}


#desk.wrl
#VRML V2.0 utf8

Group {
	children [



		Transform {
		   translation 0.0 0.25 0.0
		   rotation 1.0 0.0 0.0 1.571
		   children Shape {
			  appearance Appearance {
				 material Material {
					diffuseColor 0.5 0.25 1.0
				 }
			  }
			  geometry Box {
				size 1.5 0.8 0.05
			  }
		   }
		},


        # Legs
		Transform {
		   translation -0.5 0.0 -0.3
		   children Shape {
			  appearance Appearance {
				 material Material {
					diffuseColor 0.5 0.25 1.0
				 }
			  }
			  geometry Box {
				size 0.05 0.5 0.005
			  }
		   }
		},

		Transform {
		   translation 0.5 0.0 0.3
		   children Shape {
			  appearance Appearance {
				 material Material {
					diffuseColor 0.5 0.25 1.0
				 }
			  }
			  geometry Box {
				size 0.05 0.5 0.005
			  }
		   }
		},

		Transform {
		   translation 0.5 0.0 -0.3
		   children Shape {
			  appearance Appearance {
				 material Material {
					diffuseColor 0.5 0.25 1.0
				 }
			  }
			  geometry Box {
				size 0.05 0.5 0.005
			  }
		   }
		},


		Transform {
		   translation -0.5 0.0 0.3
		   children Shape {
			  appearance Appearance {
				 material Material {
					diffuseColor 0.5 0.25 1.0
				 }
			  }
			  geometry Box {
				size 0.05 0.5 0.005
			  }
		   }
		},


	Transform {
	      translation 0.5 0.3 0.0
	      children DEF Vase Inline {
	            url "Lamp.wrl"
	      }
	}



	]
}

#houseArch.wrl
#VRML V2.0 utf8


Group {
	children [

	# First archway
	# Left Column
		DEF LeftColumn Transform {
			translation -4.0 1.0 0.0
			children DEF Column Shape {
				appearance DEF White Appearance {
					material Material { }
				}
				geometry Box {
					size 0.1 4.0 0.3
				}
			}
		},

	# Right Column
		DEF RightColumn Transform {
			translation 4.0 1.0 0.0
			children USE Column
		},


	# Middle Column
	   DEF MidColumn Transform {
	       translation -1.0 1.0 0.0
	       children Shape {
	          appearance USE White
	          geometry Box {
	             size 0.05 3.9 0.3
	          }
	       }
	   },


	# Archway span
		DEF ArchwaySpan Transform {
			translation 0.0 3.0 0.0
			children Shape {
				appearance USE White
				geometry Box {
					size 7.9 0.15 0.3
				}
			}
		},
	# Left Roof
		DEF LeftRoof Transform {
			translation -2.0 4.12 0.0
			rotation 0.0 0.0 1.0  0.524
			children DEF Roof Shape {
				appearance USE White
				geometry Box {
					size 4.8 0.2 0.3
				}
			}
		},
	# Right Roof
		DEF LeftRoof Transform {
			translation 2.0 4.12 0.0
			rotation 0.0 0.0 1.0  -0.524
			children USE Roof
		}


	]
}

#lamp.wrl modified from VRML sourcebook
#VRML V2.0 utf8
Group {
  children [
  # Lamp
    DEF MoveLamp PlaneSensor { },
    DEF Lamp Transform {
      children [
      # Lamp base
        Shape {
          appearance DEF White Appearance {
            material Material { }
          }
          geometry Cylinder {
            radius 0.1
            height 0.01
          }
        },
      # Base - First arm joint
        Group {
          children [
            DEF MoveFirstArm SphereSensor {
              offset 1.0 0.0 0.0 -0.7
            },
            DEF FirstArm Transform {
              translation 0.0 0.15 0.0
              rotation    1.0 0.0 0.0  -0.7
              center      0.0 -0.15 0.0
              children [
              # Lower arm
                DEF LampArm Shape {
                  appearance USE White
                  geometry Cylinder {
                    radius 0.01
                    height 0.3
                  }
                },
              # First arm - second arm joint
                Group {
                  children [
                    DEF MoveSecondArm SphereSensor {
                      offset 1.0 0.0 0.0 1.9
                    },
                    DEF SecondArm Transform {
                      translation 0.0 0.3 0.0
                      rotation  1.0 0.0 0.0  1.9
                      center    0.0 -0.15 0.0
                      children [
                      # Second arm
                        USE LampArm,
                      # Second arm - shade joint
                        Group {
                          children [
                            DEF MoveLampShade SphereSensor {
                              offset 1.0 0.0 0.0 -1.25
                            },
                            DEF LampShade Transform {
                              translation 0.0 0.075 0.0
                              rotation  1.0 0.0 0.0  -1.25
                              center    0.0 0.075 0.0
                              children [
                              # Shade
                                Shape {
                                  appearance USE White
                                  geometry Cone {
                                    height 0.15
                                    bottomRadius 0.12
                                    bottom FALSE
                                  }
                                },
                              # Light bulb
                                Transform {
                                  translation 0.0 -0.05 0.0
                                  children Shape {
                                    appearance USE White
                                    geometry Sphere {
                                      radius 0.05
                                    }
                                  }
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
ROUTE MoveLamp.translation_changed   TO Lamp.set_translation
ROUTE MoveFirstArm.rotation_changed  TO FirstArm.set_rotation
ROUTE MoveSecondArm.rotation_changed TO SecondArm.set_rotation
ROUTE MoveLampShade.rotation_changed TO LampShade.set_rotation

# roundTable.wrl

#VRML V2.0 utf8

Group {
	children [



		Transform {
		   translation 0.0 0.18 0.0
		   children Shape {
			  appearance Appearance {
				 material Material {
					diffuseColor 0.5 0.25 1.0
				 }
			  }
			  geometry Cylinder {
				radius 0.5
				height 0.05
			  }
		   }
		},


        # Legs
		Transform {
		   translation -0.2 0.0 -0.2
		   children Shape {
			  appearance Appearance {
				 material Material {
					diffuseColor 0.5 0.25 1.0
				 }
			  }
			  geometry Cylinder {
				radius 0.05
				height 0.3
			  }
		   }
		},

		Transform {
		   translation 0.2 0.0 0.2
		   children Shape {
			  appearance Appearance {
				 material Material {
					diffuseColor 0.5 0.25 1.0
				 }
			  }
			  geometry Cylinder {
				radius 0.05
				height 0.3
			  }
		   }
		},

		Transform {
		   translation 0.2 0.0 -0.2
		   children Shape {
			  appearance Appearance {
				 material Material {
					diffuseColor 0.5 0.25 1.0
				 }
			  }
			  geometry Cylinder {
				radius 0.05
				height 0.3
			  }
		   }
		},


		Transform {
		   translation -0.2 0.0 0.2
		   children Shape {
			  appearance Appearance {
				 material Material {
					diffuseColor 0.5 0.25 1.0
				 }
			  }
			  geometry Cylinder {
				radius 0.05
				height 0.3
			  }
		   }
		}

	]
}

#t1.wrl
#VRML V2.0 utf8

Group {
   children [


	Transform {
	      rotation 0.0 0.0 1.0 0.785
	      scale 2.0 2.0 2.0
	      children DEF Vase Inline {
	          url "Triangle.wrl"
	      }
	}


   ]
}

#triangle.wrl
#VRML V2.0 utf8

Shape {
   appearance Appearance {

      material Material { }
   }

   geometry IndexedFaceSet {
      coord Coordinate {
         point [
              -1.0 -1.0 0.0, 1.0 -1.0 0.0
              1.0 1.0 0.0,  -1.0 1.0 0.0

         ]
       }

       coordIndex [ 3, 1, 2]
       normalPerVertex TRUE
       normal Normal {
          vector [
             0.0 0.0 1.0, 0.0 0.0 1.0,
             0.0 0.0 1.0, 0.0 0.0 1.0,
          ]
       }
       normalIndex [ 3, 1, 2 ]
     }
  }

#vase.wrl --modified from VRML sourcebook
#VRML V2.0 utf8
Group {
	children [
		PointLight {
			location 3.0 3.0 3.0
			ambientIntensity 0.2
		},
		Shape {
			appearance Appearance {
				material Material {
					ambientIntensity 0.4
					diffuseColor 0.5 0.0 0.0
					specularColor 0.70 0.70 0.70
					shininess 0.08
				}
			}
			geometry Extrusion {
				creaseAngle 1.57
				endCap FALSE
				solid  FALSE
				crossSection [
				# Circle
					 1.00  0.00,   0.92 -0.38,
					 0.71 -0.71,   0.38 -0.92,
					 0.00 -1.00,  -0.38 -0.92,
					-0.71 -0.71,  -0.92 -0.38,
					-1.00 -0.00,  -0.92  0.38,
					-0.71  0.71,  -0.38  0.92,
					 0.00  1.00,   0.38  0.92,
					 0.71  0.71,   0.92  0.38,
					 1.00  0.00
				]
				spine [
				# Straight-line
					0.0 0.0 0.0,  0.0 0.4 0.0,
					0.0 0.8 0.0,  0.0 1.2 0.0,
					0.0 1.6 0.0,  0.0 2.0 0.0,
					0.0 2.4 0.0,  0.0 2.8 0.0,
					0.0 3.2 0.0,  0.0 3.6 0.0,
					0.0 4.0 0.0
				]
				scale [
					1.8  1.8,  1.95 1.95,
					2.0  2.0,  1.95 1.95
					1.8  1.8,  1.5  1.5
					1.2  1.2,  1.05 1.05,
					1.0  1.0,  1.05  1.05,
					1.15 1.15,
				]
			}
		}
	]
}

# viewPoint.wrl
#VRML V2.0 utf8
Group {
	children [
	# Viewpoints
		Viewpoint {
			description "Forward view"
			position 0.0 1.6 5.0
		},
		Viewpoint {
			description "Corner view"
			position 3.0 1.6 3.0
			orientation 0.0 1.0 0.0 0.611
		},
		Viewpoint {
			description "60.0 FOV degree corner view"
			position 3.0 1.6 3.0
			orientation 0.0 1.0 0.0 0.611
			fieldOfView 1.047
		},
		Viewpoint {
			description "90.0 FOV degree corner view"
			position 3.0 1.6 3.0
			orientation 0.0 1.0 0.0 0.611
			fieldOfView 1.57
		},
	# Navigation
		NavigationInfo {
            type "WALK"
			speed 1.0
			headlight FALSE
			avatarSize [ 0.5, 1.6, 0.5 ]
		},
	# World
		Inline { url "apt.wrl" }
	]
}