Find the normal to the triangle assume that the triangle is


a. Familiarization with transformation

b. Familiarization with vectors and vector operations

c. Familiarization with object modelling

d. Familiarization with hierarchical object

e. Familiarization with interactive graphics

Task 1 - Using vector operations and Transformations

Purpose:

• Experience with vector and vector operations

1. Given a point P = (Px, Py, Pz) and an object, O = (Ox, Oy, Oz), Show the matrices used when computing the rotation O around P by angle α. The rotation is around the X-axis.

What is the result when P = (1,2,3), O = (4,5,6) and α =30o. The rotation is around the X- axis.

2. Given two vectors v=<2, 3, 4> and u=<1, 5, 7>, find the angle between the two vectors.

3. Given a triangle T p0=(1, 1, 1); p1 = (-1 ,-1, -1); p2 = (-1, 1, -1);

Find the normal to the triangle. Assume that the triangle is given clockwise. Normalize the vector. Draw a figure showing that your normal is correct.

Find the angle that is adjacent to p0.

Determine the area of the T

4. A heroine is carrying a triangular shield as a protection from a javelin that was thrown at her. The shield is designed to protect against any projectile that hit the shield at an angle of 60 degrees or less with respect to the shield surface, α ≤ 60 (α is the angle between the shield and the javelin). The javelin velocity (towards the target) is v=<0 ,-12, 11> and it has hit the shield at p=(px, py, pz).

The shields coordinates are s0=(5, 1,0) , s1 = (5,2,5) and s2=(10,3,10). Figure 1 illustrates the question.

4.1. Determine whether the shield will protect the heroine. Show your work.

183_Vector operations and Transformations.png

6. Find the transformation matrix which is required to rotate an object around the vector (p1 - p0) where p0 = (1,1,1) and p1 = (2, 3, 4). Show your work.

2. Task 2 - Render a sphere

Purpose:

a. View a simple 3D object.

b. Experiment with model space transformation

c. Familiarization with provided code

To do:

1. Create a project and modify code.

Modify the sphere to be at position 100, 10, 100.

Set up a view position (e.g., 200,200,200) and the look at vector to 100, 10, 100 (centre of sphere).

The sphere is rotating around the axis which is laid out along the z-axis. Set up the orientation of the sphere so that it rotates similar to the earth (66.5 degrees). Determine which axis you need to rotate around.

Display the sphere.

3. Task 3 - Create a simple complex object (hierarchical object)

Purpose:

a. Create hierarchical object

b. Use keyboard commands

c. Use transformations

To do:

2. Create a simple hierarchical object and place it beside the sphere from Task 1.

The object consists of a box and two spheres, where the spheres are placed on top of the box. Randomly set the three primary colours to the vertices (so that you can see the spheres rotating). Use the cylinder code to create the box and scale it in the required directions.

One sphere should rotate counter clock wise around the axis (CCW) at a rate of 0.1o per frame (about 3o per second).

The second sphere should rotate around the y-axis clock wise (CW) at a rate of 0.2o per frame (about 6o per second).

The user can move the cylinder in the xz plane by using the i,j,k,l keyboard strokes -

Pressing on i means translate the object by a small delta (e.g., 1) x along the x- axis = x -delta;

Pressing on l means translate the object by a small delta (e.g., 1) along the x-axis x = x + delta;

Pressing on j means translate the object by a small delta (e.g., 1) along the z-axis z = z -delta;

Pressing on k means translate the object by a small delta (e.g., 1) along the z-axis z = z + delta;

2182_Vector operations and Transformations1.png

4. Task 4 - Render a "robot arm" complex hierarchical object

Purpose:

a. Create a more complex hierarchical object

b. Use keyboard commands

c. Experiment with the simplicity of hierarchical objects

1. Create a simple "robot arm" (hierarchical object) as follows:

The object consists of 3 cylinders and 2 spheres.

2. The user can identify each of the parts using the numeric keys 1, 2, 3, 4, 5. Figure 2 shows how the parts and their ids.

3. The user can manipulate the objects as follows (note all rotations are with respect to the model object):

The user selects an object part using a numeric key 1-5

Action for cylindrical parts (id - 1, 3, 5)

Once a part is selected the user can rotate the object as follows: rotate the part using keys z and x around the y-axis (yaw rotation) by +1 or -1 degree, respectively. See the red arrows.

Action for spherical parts (id - 2, 4)

Once a part is selected the user can rotate the object as follows: rotate the part using keys z and x around the x-axis (pitch rotation) by +1 or -1 degree, respectively. See the blue arrow

4. Note that you may have to adjust the orientation of the box to ensure correct operation.

2033_Vector operations and Transformations2.png


Attachment:- nuss math 1.rar

Solution Preview :

Prepared by a verified Expert
Computer Graphics: Find the normal to the triangle assume that the triangle is
Reference No:- TGS01145819

Now Priced at $75 (50% Discount)

Recommended (97%)

Rated (4.9/5)