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

  Create a simple warm-up program using your g3d

Create a simple warm-up program using your G3D programming and graphics environment.

  Shadow effect while rolling a sphere

Shadow effect while rolling a sphere as well as the options of shading and lighting.

  Relative positioning and interactive positioning

Relative Positioning and Interactive Positioning by Dragging and Clicking and some Simple Animation

  Draw a teapot at the global origin

Draw a teapot at the global origin

  Concepts of computer graphics

Concepts of Computer Graphics and develop a program using OpenGL

  The security policy document outline

Using the GDI Case Study below, complete the Security Policy Document Outline

  Develop the image manipulations

Develop the image manipulations

  What does resolution mean

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

  Differentiate between a bitmap image and a vector image

Differentiate between a bitmap image and a vector image Explain the following terms

  Essential elements of a design pattern

configuration of an Iterator pattern, patterns could be used in a Library System, Singleton, Template, Decorator, Façade,What does Alexander means by the following declaration "But it is impossible to form anything which has the temperament of natu..

  Framework of user interface design

design of user interfaces, natural mapping, GUI applications, web page design different to designing for printed media, risks exposed in this "phone as individual proxy" approach, interaction designers of ubicomp applications, Storyboards are usual..

  What are the factors affecting picture composition

Define picture composition What are the factors affecting picture composition. Elaborate on each factor Describe the basic lines present in a composition

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