You are on page 1of 5

ME 447 : Introduction to Computer Aided Design

Instructor : Dr Farid Amirouche

Spring 2006

Solution Midterm 1
Problem 2 (20 points)
To solve the problem, we must first align LL with either the z-axis or the y-axis. Then
rotate with an angle = 30 . Then you need to put LL back in the original position.
1- Align LL with either the z-axis or the y-axis
In the solution, we are aligning LL with the z-axis. It is one approach among others.
a) move the line LL so it passes through O.
1
0
T1=
0

0
1
0
0

0 0
0 2
1 0

0 1

b) Rotation around the x-axis to make the z-axis align with LL


0
0
1
0 cos( ) sin( )
T2=
0 sin( ) cos( )

0
0
0

0
0
0

with = arctg(2/3) = 33.7


2- rotate around the z-axis with an angle = 30
This is the actual wanted transformation. Any approach must include this step.
Yet you must rotate around the axis you align LL with. In the solution, its the zaxis.

cos( ) sin( )
sin( ) cos( )
R=
0
0

0
0

0
0
1
0

0
0
0

3- Align back LL with it original position


d) Rotation back by the angle
0
0
1
0 cos( ) sin( )
T3=
0 sin( ) cos( )

0
0
0
e) Translation back
1 0 0
0 1 0
T4=
0 0 1

0 0 0

0
0
0

0
2
0

The concatenated matrix expressing the above steps is defined by


C new T4.T3. R.T2T1C old

Problem 3 (15 points)


i
X
y

1
1
1

2
3
2

3
7
8

4
8
10

total

Log(x)

0.477

0.845

0.903

2.225

Log(y)

0.301

0.903

2.204

0.228

0.714

0.815

1.757

0.144

0.763

0.90310

1.81

x.y

To determine the coefficients, we first take the logarithm of the given function
log g log x log

The problem can be solved using log or ln. You just need to be consistent .
Let

G log( g )
c1

c2 log( )
X log x

where

G c1 X c2

Then the problem is reduced to a line regression with the data set, (log (yi), log (xi))
The problem is expressed in the following form :
a1,1 a1, 2
a

2 ,1 a2 , 2
with :

c1 z1
c z
2 2
L

a1,1 xi2
i 1

a1, 2 a2,1 xi
i 1

a2, 2 i L
i 1

and
1.757 2.225
2.225
4

z1 xi yi
i 1

c1
1.81
c 2.204

solving using Kramers rules :


1.81 2.225
det
4
2.204
c1
1.1245
1.757 2.225
det
4
2.225

z2 yi
i 1

1.757 1.81
det

2.225 2.204
c2
0.0745
1.757 2.225
det
4
2.225
so

= 1.1245 and

log( ) = -0.0745 so =10-0.0745= 0.842

Finally the desired function is :

g ( x) 0.842 x1.1245

Problem 4 (10 points)


Using the hand out given in class :
For a projection onto a plane defined by as z = 4, the projection matrix is
0
0
R *C
0

0
0
1
0
0
1
0 1/ 4

0
0
0

x
y

1
1

z
The equation of the plane z=4 can also be written as 1 0
4
In order to normalize the representation of C matrix and have the last element equal to 1
we need to substitute the above ( x y 0 -z/4+1) by moving the geometry such that all
coordinates have z=4 and x and y are kept unchanged. Therefore,

Cnew

x
y
z 4

This can also be obtained by a projection onto z=0 and a translation by 4 along z
1
0

0
1
0
0

0
0
0
0

0
0
4

x
y

z

1

x
y

You might also like