CSE 5365 Comper Graphics Take Home Tes #1 Fall/1996 Tae-Hoon Kim
roblem #1) A bi-cbic parameric srface is defined by Hermie geomery in he direcion of parameer. In he direcion, he geomery ecor is defined by a poin @0, a poin @0.5, a angen ecor @1 and a second order angen ecor @1. a) Find he geomery mari [G] for he gien srface. Solion) arameric cbic cre for one coordinae in direcion for a gien of he srface (,) is epressed as follows. (,) [G 1 () G () G 3 () G 4 ()]MV (1) where V is a colmn ecor and a ranspose of a row ecor [ 3 1]. i, j (,) Assme, ij (,){i,j}, {i,j}, i, j (,) and {i,j}, ec.---- Since he geomery ecor for a gien in direcion is defined by a poin @0, a poin @0.5, a angen ecor @1, and a second order angen ecor @1, we can epress G 1 (), G (), G 3 (), and G 4 () as follows. G 1 (),0 ; G (),0.5 ; G 3 (), 1 G 4 (), Since G 1 (), G (), G 3 (), and G 4 () are epressed in Hermie geomery in direcions, hey can be epressed as follows. 1 ; G 1 (),0 0,0 1,0 0,0 1,0 MH U 0,0 1,0 H 0,0 1,0 U M () where U is a row ecor [ 3 1]. Similarly, oher erms are epressed as follows.
G (),0.5 U MH 0,0.5 1,0.5 0,0.5 1,0.5 (3) G 3 (), 1 U MH 0,1 1,1 (4) G 4 (), 1 U MH 3 3 (5) Enering (3), (4), and (5) ino (1), we ge he following geomery mari. G 0,0 0,0.5 0,1 0,1 1,0 1,0.5 1,1 1,1 0,0 0,0.5 0,1 3 0,1 1,0 1,0.5 1,1 3 1,1 (6) b) If he eqaion of his srface is gien by (,) 6 3 + 3 + 3 3 ; y(,) 3 3-4 + 5-8 ; z(,) 9 3 + 8-9 + 1 ; Find he nmerical ales for he [G ] and [G y ] for his srface. Solion) Le s firs find he differenial epressions for and y coordinaes. 18 + 6 + 6 3 ; 13 + 3 + 9 ; 1 3 + 18 ; 36 + 6 + 18 ;
3 36 + 36 ; (7) y 63-4 + 10 ; y 9-8 + 10 ; y 3 y 18-8 + 10 ; y 18-8 + 0 ; 36-8 + 0 ; (8) From he se of eqaions in (7) and (8) and sing he epression for G in (6), we obain G and G y marices wih nmerical ales as follows. G 0 0 0 0 0 3.375 4 30 0 0 0 0 0 8. 5 60 7 (0,0) (1,0) (0,0) (1,0) (0,0.5) (1,0.5) (0,0.5) (1,0.5) (0,1) (0,1) (,) 11 (,) 11 3 (0,1) (0,1) 3 (,) 11 (,) 11-8 -8 0 0-8 - 7.375 11 0 Similarly, G y 0 1 8 8 0. 5 30 48 roblem #) Viewing olme in a perspecie projecion is defined as View plane: -0; Fron plane: -80; Back plane: -180;
Side planes: y-80, -y0; Top plane: -4z+40; Boom plane: z-30; Assming a righ handed coordinae sysem, find he seqence of ransformaions which will ransform his iewing olme ino a sandard perspecie iew olme. Solion) From he inersecion of wo side planes and a op plane we obain he R before ransformaion as (8,8,3). We also ge he inersecion poins of he back plane and he wo side planes, a op plane, and a boom plane as follows. 1 and are locaed a he op plane and 3 and 4 are locaed a he boom plane. 1 (18,8,5.5); (18,18,5.5); 3 (18,18,3); 4 (18,8,3); (1) From he iew plane eqaion and assming ha VN is direced from R o he back plane, we ge he VN as [1 0 0 1] in homogeneos coordinae sysem. From he inersecion poins of planes, sing he direcion from he boom plane poin (18,8,3) o op plane poin (18,8,5.5) ha are on he same side plane, we ge VU as [0 0 1 1]. From R, we ge he firs ransformaion ranslaion mari as follows. T1 1 0 0 8 0 1 0 8 0 0 1 3 0 0 0 1 () Since VN coincides wih ais, we don hae o roae wih respec o ais. From VN, we ge he second ransformaion roaion mari wih respec o y ais as follows. The roaion angle β here is 70 coner clockwise or 90 clockwise. Ths, R cos β 0 sin β 0 0 1 0 0 sin β 0 cos β 0 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 1 (3) Applying R roaion mari o VU, we ge he new VU as follows. VU R[0 0-1 1] [-1 0 0 1] (4) From his VU, we obain he hird ransformaion roaion mari wih respec o z ais as follows. The roaion angle γ is 70. Ths,
cosγ sinγ 0 0 sinγ cosγ 0 0 R3 0 0 1 0 0 0 0 1 0 1 0 0 1 0 0 0 0 0 1 0 0 0 0 1 (5) Afer he series of ransformaions T1, R, and R3, he poins 1,, 3, and 4 in (1) are ransformed o be he following poins 1,, 3, and 4 respeciely. 1 [0.5 10 1]; [10.5 10 1]; 3 [10 0 10 1]; 4 [0 0 10 1] Now we ge he cener of aboe poins 1,, 3, and 4 as CW [5 1.5 10 1] From CW we can ge he 4 h ransformaion shear mari as follows; Sh4 1 0 5/ 10 0 0 1 15. / 10 0 0 0 1 0 0 0 0 1 1 0. 5 0 0 1. 15 0 0 0 1 0 0 0 0 1 (6) From 1 and 3 which are diagonally locaed poins in he ransformed back plane, we ge he following seqence of scale ransformaions. Sc5 is o render he iew olme heigh o be eqal o z ais coordinae of he back plane. Sc6 is o scale he iew olme niformly in all hree aes direcions sch ha he back clipping plane becomes he z 1 plane. In he following eqaions 1 represens componen of 1, 1y represens y componen of 1, ec. Sc5 1z 0 0 0 1z 0 0 0 1y - 3y 0 0 1 0 0 0 0 1 1-3 0 0 0 0 8 0 0 0 0 1 0 0 0 0 1 0 0 0 0 10/( 5. / ) 0 0 0 0 1 0 0 0 0 1 (7)
1/ 1z 0 0 0 1/ 10 0 0 0 0 1/ 1z 0 0 Now, Sc6 0 1/ 10 0 0 (8) 0 0 1/ 1z 0 0 0 1/ 10 0 0 0 0 1 0 0 0 1 If I combine all he ransformaion marices ino one ransformaion mari, he following form of combined ransformaion mari resls.. 1. 0. 8. 1 0. 8 16. T Sc6 Sc5 Sh4 R3 R T1. 1 0 0. 8 0 0 0 1
roblem #3) A cred srface is cbic in he direcion and qadric in he direcion. The parameric eqaions of he cres corresponding o 0,., and 1 are gien as; () 6 3 + 3 + 3 + ; y() 3 3-6 + 9 ; z() 8 3-4 ; when 0 (1) () 10 3-8 + 5-6 ; y() 1 3 + 16 ; z() - 3-6 ; when. () () 4 3 + 6-4 - 10 ; y() 1 3 + 16 - ; z() 3 3-8 + 10-6 ; when 1 ; (3) a) Find he coefficien mari C, C y, and C z for he gien srface. Solion) Using C, we can epress as follows; c11 c1 c13 c1 c c3 [ 3 1] c31 c3 c33 1 c41 c4 c43 (4) Eqaions in (1), (), and (3) proides 1 eqaions for 1 nknowns c11 c1 -- c43 in (4). Coefficiens for from eqaions in (1), (), and (3) for 0,., and 1 and (4) can be organized as follows o sole for 1 nknowns in (4). 6 10 4 c11 c1 c13 [ 3 3-8 6 c1 c c3 0. 1 1] [ 3 1] 3 5-4 c31 c3 c33 0. 1 1 1 1-6 -10 c41 c4 c43 (5) From (5) we can sole for C as follows. c11 c1 c13 c1 c c3 C c31 c3 c33 c41 c4 c43 6 10 4 3-8 6 3 5-4 -6-10 0. 1 0. 1 1 1 1-1 -7.5 5.5 6 7.5-69.5 3-1.5 14.5 3 35-47 Similarly, we can ge Cy and Cz as follows.
cy11 cy1 cy13 cy1 cy cy3 Cy cy31 cy3 cy33 cy41 cy4 cy43 cz11 cz1 cz13 cz1 cz cz3 Cz cz31 cz3 cz33 cz41 cz4 cz43 3 1 1 0 0 0-6 0 16 9 16-8 - 3-4 -6-8 0 0 10 0 0-6 0. 1 0. 1 1 1 1 0. 1 0. 1 1 1 1-1 -1-45 54 3 0 0 0-10 3-6 -57.5 46.5 9 56.5-61.5 8 7.5-11.5-4 1.5 -.5 0-7.5 1.5 0 b) Find he geomery mari of his srface if he direcion is assmed o hae Hermie geomery and he geomery ecor in he direcion is defined by a poin @0, @1, and a angen ecor o he cre @1. Solion) Following he similar seps in rob #1), we ge he geomery mari as follows; arameric qadric cre in direcion for a gien for a srface (,) is gien as he following form. (,) [G 1 () G () G 3 ()]MV (6) where V is a colmn ecor and is a ranspose of a row ecor [ 1]. i, j (,) Assme, ij (,){i,j}, {i,j}, i, j (,) and {i,j}, ec.---- Since he geomery ecor for a gien in direcion is defined by a poin @0, a poin @1, and a angen ecor @1, we can epress G 1 (), G (), and G 3 () as follows. G 1 (),0 ; G (),1 ;, G 3 () 1 (7) Le s find he mari M ha ransforms he geomery ecor o qadric cre coefficiens of V. We can ge M by sing hree consrains on (,) when 0 and 1 as in (7). Ths,
,0,1, 0 1 1 [G 1() G () G 3 ()]M 0 1 1 1 1 1 (8) From (8), we ge M as 0 1 0 1 1 1 1 1-1 0 1 1 1 0 1 1 0 Since G 1 (), G (), and G 3 () are epressed in Hermie geomery in direcions, hey can be epressed as follows. G 1 (),0 G (),1 G 3 (), 0,0 1,0 H 0,0 1,0 U M U MH 1 U MH (9) (10) (11) Enering (9), (10), and (11) ino (8), we ge he following geomery mari. G 0,0 0,1 1,0 1,1 0,0 0,1 1,0 1,1 0,1 1,1 0,1 1,1 (1) Now we know ha he parameric srface can be epressed as follows;
(,) [ 3 1] M H GM[ 1] (13) From aboe, we know ha G (M H ) -1 CM -1 (14) From (14), we ge he following nmerically aled geomery marices G, G y, and G z. G 0 0 0 1 1 1 1 1 C 0 0 1 0 3 1 0 0 1 0 1 1 1 1 1-10 5 14-4 54.75 3-4 -5.5 7 0 61.5 9 - -59.5 Gy (M H ) -1 C y M -1 6 6-86.5-6 16 6 3 5-93 0-6 -13.5 Gz (M H ) -1 C z M -1 4-1 67.75 0 10.5 16 3 199.5 c) Find he normal o his srface @1 and @0.5. Solion) We can ge he angen ecors in he direcions of increasing and as follows. (,) [3 1 0] C [ 1] [3 1 0] Cy [ 1] {1,.5} [3 1 0] Cz [ 1] 1 131875. 6375. 39. 565 1 (,) 3 [ 1] C [ 1 0] 3 [ 1] Cy [ 1 0] 3 [ 1] Cz [ 1 0] 1 18 0 {1,.5} 5 1 Firs sep o ge he srface normal is o obain he cross prodc of aboe wo ecors. The ecor from he cross prodc is;
N1 (,) (,) 47. 5 778. 065 14115. 1 Normalized ersion of N1 is he srface normal. The resl is; N. 814. 4633. 8403 1