Declare the constants and variables etc

Assignment Help Computer Graphics
Reference no: EM132263478

Assignment -

Part 1 - declaration etc.

Declare the constants and variables etc.

Part 2 - window.onLoad

Setup the order of operations

init();

setupCameraAndLight();

createGeometry();

createWindmillMaterials();

setupDatGui();

render();

Part 3 - Initialization

1. Configures the renderer and adds it to the dom

2. Initialize an OrbitControls object

Part 4 - Setup the Camera and Lights

The setupCameraAndLight() function will do the following:

1. Sets the position and lookAt properties of the camera.

2. Create and add an AmbientLight to the scene.

3. Create and add a DirectionalLight to the scene which must be able to cast shadows.

4. Create and add a HemisphereLight to the scene color.

5. Create and add a SpotLight to the scene color which must be able to cast shadows.

Part 5 - Add the required geometry to the scene

The createGeometries() function will do the following:

1. AxisHelper - Create and add an AxisHelper to your scene length 100.

2. Plane - Create and add a plane to your scene that is able to receive shadows.

Part 6 - Add the materials

The createWindmillMaterials() function will do the following:

1. Create a MeshLambertMaterial for the arms.

2. Create a MeshStandardMaterial for the tower and axle.

Part 7 - Setup the necessary gui controls

The initGuiControls() function will do the following:

1. "Scene rotation" - checkbox. Only stops the scene rotation

2. "enableSpotlight" - function

3. "Arm color" - color

4. "Arm visibility" - bool

5. "Body color" - color

6. "Body visibility" - bool

7. "Rotation speed" - numeric slider range 0 to 0.04. Sets the speed for both the arms and scene

8. "Windmill" - folder

9. "Arm length" - numeric slider. (min=12, max=18 and step=2). Default =16.

10. "Number of Arms" - numeric slider. (min=2, max=5 and step=1) . Default =3.

11. "Tower height" - numeric slider. (min=18, max=27 and step=3) . Default =22.

12. "Create" - function calls the createWindmill() with the above values to obtain an object and adds it to the scene.

Part 8 - Add the object to the scene

The createWindmill() function will take armLength. bodyLength, numberOfArms and the armInclination = 0.25 and do the following:

1. Object3D - To serve as the container for the component of this object

2. CylinderGeometry - that is scaled appropriately to be the body of the hovercraft.

Uses the towerMaterial that was created in the Part 6

3. Object3D - To serve as the container for the arms and axle. You will have position it properly and then add it to the container in step 1.

4. BoxGeometry - use 4 for the width, 0.2 for the thickness and the length is specified by the argument.

Uses the armMaterial that was created in Part 6

This must be repeated as many times as specified by the argument

5. CylinderGeometry -to be the axle of the object.

Uses the bodyMaterial that was created in the Part 6

6. Returns the completed 3-D object.

Part 9 - Render the scene

The render() function will do the following:

1. Update the orbitController object.

2. Rotate the arm based on the value in the dat.gui controller.

3. Rotate the scene or stop based on the dat.gui controller.

Attachment:- Assignment Files.rar

Reference no: EM132263478

Questions Cloud

Describe aligning projects with business strategies : Organizational strategy is typically defined as a set of actions that managers take to outperform the organization's competitors and achieve profitability.
Explain how the federal government has gained power : Explain how the federal government has gained power at the expense of state governments.
Calculate an equivalent annual income : Calculate an equivalent annual income for 20 years on the following income stream received over 30 years if the interest rate is 10% per annum compounded
Example of the execution of two words : The following is an example of the execution of twoWords:
Declare the constants and variables etc : Declare the constants and variables etc. Setup the order of operations. Create and add a DirectionalLight to the scene which must be able to cast shadows
How many units should be ordered : If 90 percent service probability is desired, how many units should be ordered?
Deploying a firewall is most commonly used in businesses : "Which architecture for deploying a firewall is most commonly used in businesses today? Why?".
How does jesus reverse conventional thinking with these two : After doing a little research on how mustard seed and leaven were viewed in first-century Palestine, please write your own interpretation of both parables.
Will globalization and growth in worldwide sourcing : Will globalization and growth in worldwide sourcing have a positive or negative effect over the long run in the United states and why.

Reviews

Write a Review

Computer Graphics Questions & Answers

  Describe hardware flow control''s advantage over software

Describe hardware flow control's advantages over software flow control in terms of improving modem speed.

  What does resolution mean

What does resolution mean How is resolution connected to ppi and dpi units

  Read the article values-based service brands narratives

read the article values-based service brands narratives from ikea by edvardsson from the readings for this module.

  Determine the avant garde movements you will be referencing

Determine the avant garde movements (3) you will be referencing. Research their characteristics and visual representation. Work outside the computer first quickly brainstorming visual solutions for each composition.

  Define software use to develop the front-end gui application

describe what software you propose to use to develop the front-end GUI application for the new system. Be sure to justify your choice. Keep in mind portability, ease of use, scalability, and ability to update. What other options have you considere..

  What is meant by the terms static media and dynamic media

What is meant by the terms static media and dynamic media? Give two examples of each type of media?

  Display the properties that correspond to the search

Display the properties that correspond to the search made by the user on the search page. 10% for search functionality - 10% for the displaying the results in an effective and pleasant way

  Describe the advantages and disadvantages of using methods

The second method is to use slide templates, slide layouts, and color and animation schemes already built into PowerPoint.

  Java applets based question

Class Graphics contains technique draw Oval, which takes as discussions the same 4-arguments as method drawRect.

  .what will happen if you connect p3.5 at the buzzer

Consider the following code segment. Assume that processor clock in the active mode is set to 1,000,000 Hz. In this mode the platform draws 0.5 mA.

  Analyze security requirements and develop a security policy

analyze security requirements and develop a security policy that fully addresses them. the project will enable the

  You are required to develop a social marketing plan for a

you are required to develop a social marketing plan for a social marketing problem and organisation of your choice.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd