Chris Pollett > Students >
Joom

    ( Print View )

    [Bio]

    [CS297Proposal]

    [Del1]

    [Del2]

    [Del3]

    [CS298Proposal]

    [DemoIE298]

    [DemoMozilla298]

    [CS298Report-PDF]

    [CS298Presentation-PDF]

                           

























Joom's VRML Apartment

To see this demo you need a VRML plug-in. Cortona is the one I used.

The second project deliverable - my VRML appartment

VRML Code

#
# apt.wrl
#

#VRML V2.0 utf8

# Floor
Group
{
	children
	[
		Shape
		{
			appearance DEF White Appearance
			{
				material Material
				{ diffuseColor 0.35 0.35 0 }
			}
			geometry Box
			{ size 10 0.01 10 }

		}

# Carpet

		Transform
		{
			translation 0 0 2.0
			scale 0.75 0.75 0.75
			children
			[
				Shape
				{
					appearance DEF CoffeeBean Appearance
					{
						texture ImageTexture
						{ url "CoffeeBean.jpg" }
					}
					geometry Box
					{ size 6 0.02 3 }
				}		
			]
		}

	]
}

# Wall behind the sofa
Group
{
	children
	[
		Transform
		{
			translation 3.25 1.25 0
			children
			[
				DEF Wall Shape
				{	
					appearance DEF Blue Appearance
					{
						material Material
						{ diffuseColor 0 0 1.0 }
					}
					
					geometry Box
					{ size 3.5 2.5 0.1 }
				}
			]
		},
#
# Wall between diniroom and bed room
#		
		Transform
		{
			translation 0 1.25 -2.5
			children
			[ 
				Shape
				{
					appearance USE Blue
					geometry Box
					{ size 0.1 2.5 5 }
				}
			]
		},
#
# Door to bedroom
#
		Transform
		{
			translation 0.75 1.25 -0.375
			rotation 0 1 0 0.52 
			children
			[
				Shape
				{
					appearance USE Blue
					geometry Box
					{ size 1.5 2.5 0.1 }
				}

			]
		},
#
# Door knob
#
		Transform
		{
			translation 1.2 1.25 -0.45
			children
			[
				Shape
				{
					appearance Appearance
					{	material Material
						{ diffuseColor 1.0 1.0 0 }
					}
					geometry Sphere
					{ radius 0.1 }
				}

			]
		}

	]
}

#
# furniture
#
Group
{
	children
	[
#
# Love Seate
#
		Transform
		{
			translation 0 0 4
			scale 0.5 0.5 0.35
			rotation 0 1 0 4.712
			children DEF Sofa Inline { url "sofa.wrl"}
		},
#
# Sofa
#
		Transform
		{
			translation 2.85 0 2.25
			scale 0.5 0.5 0.5
			children DEF LoveSeat Inline { url "sofa.wrl"}
			
		},
#
# Coffee table
#
		Transform
		{
			translation 0 0 2.0
			scale 0.6 0.6 0.6
			rotation 0 1 0 1.571
			children DEF Sofa Inline { url "coffeeTable.wrl"}
		}
#
# dining set
#
		Transform
		{
			translation -2.2 0 -2.2 
			scale 0.55 0.55 0.55
			children DEF Dining Inline { url "diningSet.wrl" }
		},
#
# bed
#
		Transform
		{
			translation 0.11 0 -3
			scale 0.75 0.75 0.75
			children Inline { url "bed.wrl" }
		},
#
# table
#
		Transform
		{
			translation -4.75 0 3.75
			scale 0.75 0.75 0.75
			children Inline { url "table.wrl"}
		},
#
# lamp
#
		Transform
		{
			translation -4.25 1.0125 2
			scale 0.25 0.25 0.25
			rotation 0 1 0 0.6
			children Inline { url "lamp.wrl"}
		}

	]
	
}
#
# bed.wrl
#

#VRML V2.0 utf8

Group
{
	children
	[
#
# Bed frame
#	
		Transform
		{
			translation 2.5 0.325 -0.875
			children
			[
				Shape
				{
					appearance DEF Gray Appearance
					{
						material Material
						{ diffuseColor 0.4 0.4 0.4 }
					}

					geometry Box
					{ size 5 0.45 1.75 }
				}

			]
		},

		Transform
		{
			translation 2.75 0.575 -0.875
		
			children
			[
				Shape
				{
					appearance Appearance
					{
						material Material
						{ diffuseColor 1.0 0 0}
					}
					
					geometry Box
					{ size 4.5 0.25 1.7 }
				}
			]
		},

		Transform
		{
			translation 0 0.85 -0.2
			children
			[
				DEF Stick Shape
				{
					appearance USE Gray
					geometry Box
					{ size 0.03 1.2 0.1 }
				}
			]
		},

		Transform
		{
			translation 0 0.85 -1.55
			children [ USE Stick ]
		},

		Transform
		{
			translation 0 1.2 -0.875
			children
			[
				Shape
				{
					appearance USE Gray
					geometry Box
					{ size 0.1 0.35 2.0 }
				}
			]
		}
		
	]
}
#
# chair.wrl
#

#VRML V2.0 utf8

Group
{
	children
	[
		Transform
		{
			translation 0 1.1 0
			children
			[
				Shape
				{
					appearance DEF Chocolate Appearance
					{ material Material{ diffuseColor 0.5.11 0} }
					geometry Box
					{ size 1.4 0.175 1.4 }
				}
			]
		},
#
# Right-front leg
#
		Transform
		{
			translation 0.7 0.825 0.7
			children
			[
				DEF FrontLeg Shape
				{
					appearance USE Chocolate
					geometry Cylinder
					{ radius 0.075
					  height 1.75
					}
				}
			]
		},
#
# Left-front leg
#
		Transform
		{
			translation -0.7 0.825 0.7
			children [ USE FrontLeg ]
		}

#
# Right-back leg
#
		Transform
		{
			translation 0.7 1.225 -0.7
			scale 1 1.4 1
			children [ USE FrontLeg ]
		},
#
# Left-back leg
#
		Transform
		{
			translation -0.7 1.225 -0.7
			scale 1 1.4 1
			children [ USE FrontLeg ]
		},
#
# Back-end
#
		Transform
		{
			translation 0 2.20 -0.7
			children
			[
				Shape
				{
					appearance USE Chocolate
					geometry Box
					{ size 1.4 0.3 0.15 }
				}
			]
		},
		
		Transform
		{
			translation 0.7 2.45 -0.7
			children
			[
				DEF BackSphere Shape
				{
					appearance USE Chocolate
					geometry Sphere
					{ radius 0.075 }
				}
			]
		},

		Transform
		{
			translation -0.7 2.45 -0.7
			children
			[
				DEF BackSphere Shape
				{
					appearance USE Chocolate
					geometry Sphere
					{ radius 0.075 }
				}
			]
		},

#
# Arm Rest
#
		Transform
		{
			translation 0.7 1.75 0
			rotation 1 0 0 1.571
			children
			[
				DEF ArmRest Shape
				{
					appearance USE Chocolate
					geometry Cylinder
					{ radius 0.075	
					  height 1.4
					}
#					geometry Box
#					{ size 0.15 0.03 1.3 }
				}
			]
		},

		Transform
		{
			translation -0.7 1.75 0
			rotation 1 0 0 1.571
			children [ USE ArmRest]
		},

		Transform
		{
			translation 0.7 1.75 0.7
			children [ USE BackSphere]
		},

		Transform
		{
			translation -0.7 1.75 0.7
			children [ USE BackSphere]
		}




	]
}
#
# coffeetable.wrl
#

#VRML V2.0 utf8

Group
{
	children
	[
#
# Top
#	
		Transform
		{
			translation 0 1 0
			children
			[
				DEF Plate Shape
				{
					appearance DEF Wood Appearance
					{
		    				material Material{}
						texture	ImageTexture
						{ url	"wood.jpg"}
					}
			
					geometry Box
					{ size 1.8 0.075 2.8 }
				}
			]
		},

#
# Buttom
#	
		Transform
		{
			translation 0 0.4 0
			children 
			[
				Shape
				{
					appearance DEF Wood Appearance
					{
		    				material Material{}
						texture	ImageTexture
						{ url	"wood.jpg"}
					}
			
					geometry Box
					{ size 1.5 0.075 2.5 }
				}
			]
		},

#
# Leg
#

# Front right leg
		Transform
		{
			translation 0.75 0.51 1.25
			children
			[
				DEF Leg Shape
				{
					appearance USE Wood
					geometry Box
					{ size 0.1 1.0 0.1 }
				}
			]
		},
# Front left leg
		Transform
		{
			translation -0.75 0.51 1.25
			children
			[ USE Leg ]
		},

# Back right leg
		Transform
		{
			translation 0.75 0.51 -1.25
			children
			[ USE Leg ]
		},

# Back left leg
		Transform
		{
			translation -0.75 0.51 -1.25
			children
			[ USE Leg ]
		}
	]		
}

#
# diningSet.wrl
#

#VRML V2.0 utf8

Group
{
	children
	[
#
# table
#	
	Transform
	{
		scale 0.9 0.9 0.9
		children DEF Table Inline { url "diningTable.wrl" },
	},
#
# chairs
#	

	Transform
	{
		translation 0.0 0.0 -2.5
		children DEF Chair Inline { url "chair.wrl" }
	},

	Transform
	{
		translation 0.0 0.0 2.5
		rotation 0 1 0 3.14
		children USE Chair
	},

	Transform
	{
		translation -2.5 0 0
		rotation 0 1 0 1.571
		children USE Chair
	},

	Transform
	{
		translation 2.5 0 0
		rotation 0 1 0 -1.571
		children USE Chair
	}


	]
}
#
# diningTable.wrl
#

#VRML V2.0 utf8

Group
{
	children
	[
#
# Top
#
		Transform
		{
			translation 0 2.5 0
			children
			[
				DEF Plate Shape
				{
					appearance DEF Wood Appearance
					{
						material Material
						{ diffuseColor 0.25 0.15 0.1 }
						texture ImageTexture
						{ url "wood.jpg" }
					}
					geometry Cylinder
					{ radius 2.25
					  height 0.125
					}
				}
			]
		},
#
# Base
#
		Transform
		{
			scale 0.6 0.6 0.6
			children
			[ USE Plate]
		},
		
		Transform
		{
			translation 0 0.175 0
			children
			[
				Shape
				{
					appearance USE Wood
					geometry Cone
					{ height 0.35
					  bottomRadius 0.9
					}
				}

			]
		},

		Transform
		{
			translation 0 0.25 0
			children
			[
				Shape
				{
					appearance USE Wood
					geometry Cone
					{ height 0.5
					  bottomRadius 0.7					 
					}
				}

			]
		},

		Transform
		{
			translation 0 1.25 0
			children
			[
				Shape
				{
					appearance USE Wood
					geometry Cylinder
					{ radius 0.175
					  height 2.5
					}
				}
			]
		}
		
	]
}
#
# Lamp.wrl
#

#VRML V2.0 utf8

Group
{
	children
	[
#
# lamp base
#
		Transform
		{
			children
			[
				Shape
				{
					appearance DEF Yellow Appearance
					{
						material Material
						{ diffuseColor 1 1 0 }
					}
					geometry Cylinder
					{
						radius 0.5 
						height 0.08
					}
				}
			]
		},
		
#
# the first lamp arm
#
		Transform
		{
			translation 0 0.75 0
			rotation 1.0 0 0 -0.698
			center 0 -0.75 0
			children
			[
				DEF Arm Shape
				{
					appearance USE Yellow
					geometry Cylinder
					{
						radius 0.07 
						height 1.5
					}
				},
#
# Joining 
#	
				DEF Joint Transform
				{
					translation 0 0.75 0
					children
					[
						Shape
						{ 
							appearance USE Yellow
							geometry Sphere { radius 0.08 }
						}
					]
				},		
#
# the second lamp arm (higher arm)
#
				Transform
				{
					translation 0 1.5 0
					rotation 1.0 0 0 1.918
					center 0 -0.75 0
					children
					[
						DEF Arm Shape
						{
							appearance USE Yellow
							geometry Cylinder
							{
								radius 0.07 
								height 1.5
							}
						},
#
# joining
#	
						USE Joint	
#
# lamp shade
#		
						Transform
						{
							translation 0 0.9 0
							rotation 1.0 0 0 -1.39
							children
							[
								Shape
								{
									appearance USE Yellow
									geometry Cylinder
									{
										height 0.3
										radius 0.15
										bottom FALSE
									}
								},
								
								Transform	
								{
									translation 0 -0.15 0
									children
									[
										Shape
										{
											appearance USE Yellow
											geometry Cone
											{
												height 0.6
												bottomRadius 0.5
												bottom FALSE
											}
										},
#
# light bulb
#
										Transform
										{
											translation 0 -0.15 0
											children
											[
												Shape
												{
													appearance DEF Yellow Appearance
													{
														material Material
														{ diffuseColor 0 0 0 
														  emissiveColor 1.0 1.0 1.0}
													}
													geometry Sphere
													{ radius 0.2 }
												}
											]
										},
									]
								}
							
							]
						}						
					]
				}						
			]
		},


	]
}

#
# Sofa.wrl
#

#VRML V2.0 utf8

Transform
{
	translation 0 0.25 0
	children
	[
		
#
# Sofa base
#		
		Shape
		{
			appearance DEF Col1 Appearance
			{
				material Material
				{ diffuseColor 1.0 0.33 0 }
		
			}


			geometry Box
			{ size 2.0 0.5 6.0 }	
		},

#
# Sides
#

		Transform
		{
			translation 0 0.75 2.9
			children
			[
				DEF Side Shape
				{
					appearance USE Col1
					geometry Box
					{ size 2.0 1.5 0.2 }
				}
			]
		},

		Transform
		{
			translation 0 0.75 -2.9
			children
			[ USE Side ]
		},

#
# Left arm rest
#
		Transform
		{
			translation 0 1.5 2.9
			scale 1 1 1.3
			rotation 0 0 1 1.571
			children
			[
				DEF ArmRest Shape
				{
					appearance USE Col1
					geometry Cylinder
					{	radius 0.15
						height 2.0
					}
				}
			]
		},

#
# Right arm rest
#
		Transform
		{
			translation 0 1.5 -2.9
			scale 1 1 1.3
			rotation 0 0 1 1.571
			children
			[ USE ArmRest]
		},

#
# Back
#
		Transform
		{
			translation 1.15 0.75 0
			children
			[
				DEF Back Shape
				{
					appearance USE Col1
					geometry Box
					{ size 0.3 2.0 6}
				}			
			]
		},
		Transform
		{
			translation 1.15 1.9 0
			rotation 1 0 0 1.571
			scale 1.5 1 1
			children
			[ 
				DEF BackRest Shape
				{	
					appearance USE Col1
					geometry Cylinder
					{	radius 0.15
						height 6
					}
				}
			]
		}

#
# Couch
#
		Transform
		{
			translation 0.125 0.4 0
			children
			[
				DEF Couch Shape
				{
					appearance USE Col1
					geometry Box
					{ size 1.75 0.3 5.70 }
				}
			]
		},
		
		Transform
		{
			translation -0.8 0.3 0
			rotation 1 0 0 1.571
			scale 1 1 1.2
			children
			[
				Shape
				{
					appearance USE Col1
					geometry Cylinder
					{	radius 0.2
						height 5.7	
					}
				}
			]
		}	

	]
}

#
# Table.wrl
#

#VRML V2.0 utf8

Transform
{
	translation 1 0 -1.5
	children
	[
		Transform
		{
			translation 0 1.25 0
			children
			[
				Shape
				{
					appearance DEF Chocolate Appearance
					{
						material Material
						{ diffuseColor 0.5.11 0 }
					}
	
					geometry Box
					{ size 2 0.1 3}
				}
#
# a peice of paper
#
				Transform
				{
					translation 0.25 0.1 -0.25
					children
					[
						Shape
						{
							appearance Appearance
							{
								material Material
								{ diffuseColor 1.0 1.0 1.0 }
							}
	
							geometry Box
							{ size 0.75 0.01 0.75}
						}
					]
				}				

			]
		}

		Transform
		{
			translation 0 0.625 0
			children
			[

				Shape
				{
					appearance USE Chocolate
					geometry Cylinder
					{ radius 0.2
					  height 1.25
					}
				}
			]
		}
	]
}