Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
3Activity
0 of .
Results for:
No results containing your search query
P. 1
CG ASSSIGN 03

CG ASSSIGN 03

Ratings: (0)|Views: 25|Likes:
Published by Amber Chandra
Assignment 3
Assignment 3

More info:

Categories:Types, Research
Published by: Amber Chandra on Apr 07, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

07/08/2012

pdf

text

original

 
 
Annexture II
Homework Title/No. : 3 Course Code :cse 405Course Instructor : lect. NITIKA SHARMA Course Tutor(if applicable):_________ Date of Allotment :_________________ Date of submission :6-APR-2011__ Student’s Roll No. :_RC1801A10 ____ Section No. :C1801___ 
Declaration :
I declare that this assignment is my individual work. I have not copied from anyother student’s work or from any other source except where dueacknowledgement is made explicitly in the text,nor has any part been written for me by another person.Student’s Signature :Amber Evaluator’s comments :________________________________________________________________ ___________ Marks obtained :______________________ out of _________________________ 
 
Q.1.How can scaling with respect to a point P
0
(.x
0
,y
0,
z
0
) be defined in termsof scaling with respect to the origin?
Ans the matrix expression for scaling transformation of a position p=(x0,y0,z0)relative to the coordinate origin can be written asX’
sx 0 0 0 x0
Y’ 0 sy 0 0 y0Z= 0 0 sz 0 z01 0 0 0 1 1 P’=s.pWhere scaling parameters sx,sy,sz are assigned any positive values.X’=x.sxY’=y.syZ’=z.szScaling an object with transformation changes the size of object and repositionsthe object relative to coordinate origin. Also if the transformations parametersare not all equal,relative dimentions in the object are changed.we preserve theoriginal shape of the object with a uniform scaling(sx=sy=sz).Scaling about a fixed point P
0
(
.x
0
,y
0,
z
0
) can be accomplished by the following:1. Translating P
0
to the origin2. Scaling the object3. Translating P
0
back to original position.
Q 2
 
Develop a text clipping algorithm that clips individual charactersassuming that the characters are defined in a pixel grid of a specified size
..
Ans:
With regard to the representation of characters, we can split clipping into
areaclipping
or 
line clipping
. Area clipping is used in the case where characters arerepresented by a bitmap, and line clipping is practical if characters arerepresented by lines. But, in the majority of cases we use characters composedfrom lines and curves, so-called vectors. Its advantage is that we can zoom or scale, without a loss of quality.
 
According to how precise we want the clipping of a text, we categorize clippinga text as follows:
precise
clipping
clipping to
a character 
 
clipping
a text by words or whole row
.In normal text coding, each character is represented by one value totaling 1 byte.In clipping, we should look at a character as an inseparable object. Everycharacter comprises a minimum rectangle, which we will call a
'character envelope' 
. While clipping a character to a character, we test whether the center of an envelope is in the display box, or whether the envelope is wholly inside thedisplay box or not. On the basis of this we decide whether to display the givencharacter.
Q3 Find the transformation which aligns vector V=I+J+K with the vectorN=2I-J-K.Ans:
The transformation which aligns vector V=I+J+K with the vector N=2I-J-
6/ 3 - 1/√ 3√ 6 -1/√ 3√ 6 00 1/√ 6 -1/√ 6 01/√ 3 1/√ 3 1/√ 3 01 0 0 1
v= i+j+k so,| v |= √ 1
2
+ 1
2
+ 1
2
= √ 3And N = 2i –j-k so, |N|= 2
2
+ (-1
2
) +(- 1
2
)= √ 4+1+1=√ 6
Part bQ.4.
 
Obtain the rotation matrices about x-axis,y-axis and z-axis in 3D.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->