Comper Graphics 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 marix [G] for he gien srface. Solion) arameric cbic cre for one coordinae in direcion for a gien of he srface (,) is expressed 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 express 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 expressed in Hermie geomery in direcions, hey can be expressed 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 ()
Comper Graphics where U is a row ecor [ 3 1]. Similarly, oher erms are expressed 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 marix. 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)
Comper Graphics b) If he eqaion of his srface is gien by x(,) 6 3 + 3 + 3 3 ; y(,) 3 3-4 + 5-8 ; z(,) 9 3 + 8-9 + 1 ; Find he nmerical ales for he [G x ] and [G y ] for his srface. Solion) Le s firs find he differenial expressions for x and y coordinaes. x 18 + 6 + 6 3 ; x 13 + 3 + 9 ; x 1 3 + 18 ; x 36 + 6 + 18 ; 3 x 36 + 36 ; (7) y 63-4 + 10 ; y 9-8 + 10 ; y 18-8 + 10 ; y 18-8 + 0 ; 3 y 36-8 + 0 ; (8) From he se of eqaions in (7) and (8) and sing he expression for G in (6), we obain G x and G y marices wih nmerical ales as follows.
Comper Graphics x(0,0) x(1,0) G x x (0,0) x (1,0) x(0,0.5) x(1,0.5) x (0,0.5) x (1,0.5) x (0,1) x (0,1) x x (,) 11 (,) 11 3 x (0,1) x (0,1) 3 x x (,) 11 (,) 11 0 0 0 0 0 3.375 4 30 0 0 0 0 0 8. 5 60 7-8 -8 0 0-8 - 7.375 11 0 Similarly, G y 0 1 8 8 0. 5 30 48
Comper Graphics roblem #) The iewing olme in a perspecie projecion is defined as View plane: x-0; Fron plane: x-80; Back plane: x-180; Side planes: y-80, x-y0; Top plane: x-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 marix as follows. T1 1 0 0 8 0 1 0 8 0 0 1 3 0 0 0 1 () Since VN coincides wih x axis, we don hae o roae wih respec o x axis. From VN, we ge he second ransformaion roaion marix wih respec o y axis 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 marix o VU, we ge he new VU as follows.
Comper Graphics VU R[0 0-1 1] [-1 0 0 1] (4) From his VU, we obain he hird ransformaion roaion marix wih respec o z axis 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 marix 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 axis coordinae of he back plane. Sc6 is o scale he iew olme niformly in all hree axes direcions sch ha he back clipping plane becomes he z 1 plane. In he following eqaions 1x represens x 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 1x - 3x 0 0 0 0 10/( 5. / ) 0 0 0 0 1 0 0 0 0 1
Comper Graphics 0 0 0 0 8 0 0 (7) 0 0 1 0 0 0 0 1 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 marix, he following form of combined ransformaion marix resls.. 1. 0. 8. 1 0. 8 16. T Sc6 Sc5 Sh4 R3 R T1. 1 0 0. 8 0 0 0 1
Comper Graphics
Comper Graphics 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; x() 6 3 + 3 + 3 + ; y() 3 3-6 + 9 ; z() 8 3-4 ; when 0 (1) x() 10 3-8 + 5-6 ; y() 1 3 + 16 ; z() - 3-6 ; when. () x() 4 3 + 6-4 - 10 ; y() 1 3 + 16 - ; z() 3 3-8 + 10-6 ; when 1 ; (3) a) Find he coefficien marix C x, C y, and C z for he gien srface. Solion) Using C x, we can express x as follows; cx11 cx1 cx13 cx1 cx cx3 x [ 3 1] cx31 cx3 cx33 1 cx41 cx4 cx43 (4) Eqaions in (1), (), and (3) proides 1 eqaions for 1 nknowns cx11 cx1 -- cx43 in (4). Coefficiens for x 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 cx11 cx1 cx13 [ 3 3-8 6 cx1 cx cx3 0. 1 1] [ 3 1] 3 5-4 cx31 cx3 cx33 0. 1 1 1 1-6 -10 cx41 cx4 cx43 (5) From (5) we can sole for Cx as follows.
Comper Graphics cx11 cx1 cx13 cx1 cx cx3 Cx cx31 cx3 cx33 cx41 cx4 cx43 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 marix 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 marix 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.----
Comper Graphics 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 express G 1 (), G (), and G 3 () as follows. G 1 (),0 ; G (),1 ;, G 3 () 1 (7) Le s find he marix 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 0 (8) From (8), we ge M as -1 0 1 0 1 1 1 1 0 1 1 1 0 1 1 0 Since G 1 (), G (), and G 3 () are expressed in Hermie geomery in direcions, hey can be expressed 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 marix.
Comper Graphics 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) The parameric srface can be expressed as follows; (,) [ 3 1] M H GM[ 1] (13) From aboe, G (M H ) -1 CM -1 (14) From (14), we ge he following marices G x, G y, and G z. Gx 0 0 0 1 1 1 1 1 C x 0 0 1 0 3 1 0 0 1 0 1 1 1 1 0-10 3 14-4 40.75 3-4 - 8.5 7 0 34.5-9 - 0-68.5-1 8-9.5 Gy (M H ) -1 C y M -1-6 16 1 3 5-96 0-6 -13.5 4-1 63.75 Gz (M H ) -1 C z M -1 0 10.5 16 3 183.5
Comper Graphics 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] Cx [ 1] [3 1 0] Cy [ 1] {1,.5} [3 1 0] Cz [ 1] 1 131875. 6375. 39. 565 1 (,) 3 [ 1] Cx [ 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 0.814 0.4633 0.8403 1