Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this unit, we explored the basic concepts of color, color blending, and transparency. demonstrate both your ability to perform transformations on an object and

In this unit, we explored the basic concepts of color, color blending, and transparency. demonstrate both your ability to perform transformations on an object and implement principles of color in computer graphics. create a program that will create a 3-dimensional object.
Use the shape of a cube, sphere, or torus knot for this assignment. Your program must display the object within the scene. Your object should be scaled such that it only covers a small portion of the viewing area.
You must animate the object by making it move across the viewing space. When the object reaches the limit of the viewing port, it must change direction (think of it as a ball that is bouncing around in a box). Apply basic color to your object and the color should be changed every time the object encounters an edge of the viewing area.
The areas of shadow should also change as the ball changes position within the view.
To move your object you should alter the x and y coordinates of the object. Assuming that your mesh is called myMesh, the position of the object can be changed by changing the following attributes of the object:
myMesh.position.x
myMesh.position.y
You can experiment to determine the limits of the viewing area on your scene and use it to determine when the object has encountered the edge of the viewing area and determine the bounce. You can cause the object to move by incrementing or decrementing the value of x and y. When your object encounters the edge of the viewing space you should cause it to bounce away in an opposite direction. You can do this by decrementing either the x or y position as appropriate. Experiment with this until you can control the direction of the moment of your object and simulate the effect of your object bouncing around the area of the viewport.
Note:
It is essential to document your code liberally with comments to ensure that a reviewer understands what you were attempting to do within the assignment.
When you have completed the assignment, you must click on the share button and copy both the Graphics View(Live and full preview) and the Code View URLs and then submit with your assignment. You can also submit your JavaScript code, but you should only cut and paste the code into the submission dialogue box. Do not attach the source code document. Your assignment is due at the end of this unit.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Mining Concepts And Techniques

Authors: Jiawei Han, Micheline Kamber, Jian Pei

3rd Edition

0123814790, 9780123814791

More Books

Students also viewed these Databases questions

Question

b. What are its goals and objectives?

Answered: 1 week ago