Reference no: EM132244640
Advanced Graphics Assignment - Lab: Using containers
Objective for this lab:
- To be cultivate spatial reasoning again.
- To build a moderately complex (at least relatively so far) threejs application to display a Ferris wheel. Use your own colors and material. Avoid THREE.MeshPhongMaterial material.
- Do all the assigned problems on your own.
Tasks:
You will use your work from the previous lab.
If you are not comfortable with your Lab 5 then, there is a new base to start your application with. It contains an axis-helper, a plane, a cube, a directional and a hemisphere light. There is even a controller setup to toggle rotation of scene.
It is recommended that you use a THREE.Obect3D object as your container.
Controls to specify the following:
a) outerRadius
b) innerRadius
c) rimWidth
d) axleRadius
e) spokeLength
f) numberOfSpokes
g) toggle rotation of wheel
h) toggle rotation of scene
Rims: Like your previous lab, the outer geometry is an extruded geometry. You must provide an interface to specify the width between the two rims or the width of the wheel.
Spokes: These are cubes. After creating the first spoke, to speed up coding, you may clone if and simply change the angle of rotation for the next one. You must provide an interface to specify the number of spokes.
Axle: This is a cylinder that is rotated in the x-direction. You must provide an interface to specify the radius of the axle.
Basket: This consists of a horizontal and a vertical cube and a partial-sphere.
During rotation the baskets must always be pointing to the ground.
Embed the above code in a function. This function will require you to specify all the relevant values of the controls (see the first task). Call the function multiple times to create a field of Ferris Wheels.
Attachment:- Assignment File.rar