###################################################### # Summer project for Summer 1996 # ###################################################### ## # ## Doplphin # ## # ###################################################### # # # Amy Ashurst Gooch # # # ###################################################### { a = anchor(pt(.5,.5,0), vec(1,0,0), vec(0,1,0), vec(0,0,1)); show(a); { point0 = pt(0,0.01,0); point1 = pt( 0.01, 0.04, 0 ); point2 = pt( 0.04, 0.09, 0 ); point3 = pt( 0.13, 0.12, 0 ); point4 = pt( 0.23, 0.13, 0 ); point5 = pt( 0.35, 0.125, 0 ); point6 = pt( 0.45, 0.12, 0 ); point7 = pt( 0.59, 0.11, 0 ); point8 = pt( 0.69, 0.09, 0 ); point9 = pt( 0.78, 0.07, 0 ); point10 = pt( 0.86, 0.05, 0 ); point11 = pt( 0.91, 0.02, 0 ); point12 = pt( 0.96, -0.017, 0 ); point13 = pt( 1.01, -0.064, 0 ); point14 = pt( 1.07, -0.105, 0 ); } top_profile = uniOpCrv(3,point0,point1, point2, point3, point4, point5, point6, point7, point8, point9, point10, point11 ); { point15 = pt( -0.100, -0.08, 0 ); point16 = pt( -0.067, -0.0678, 0 ); point17 = pt( -0.020, -0.0576, 0 ); point18 = pt( 0.031, -0.044, 0 ); point19a = pt(0.0,-.010,0); point19 = pt( 0.102, -0.0169, 0 ); point20 = pt( 0.196, 0.00677, 0 ); point21 = pt( 0.318, 0.0101, 0 ); point22 = pt( 0.406, 0.0102, 0 ); point23 = pt( 0.498, 0.00677, 0 ); point24 = pt( 0.593, 0.00677, 0 ); point25 = pt( 0.684, -0.00338, 0 ); point26 = pt( 0.796, -0.0203, 0 ); point27 = pt( 0.847, -0.0406, 0 ); point28 = pt( 0.912, -0.0508, 0 ); point29 = pt( 0.955, -0.0644, 0 ); point30 = pt( 0.996, -0.0847, 0 ); point31 = pt( 1.057, -0.125, 0 ); } { sp9 = pt(-.1, -.08,.045); sp8=pt( -0.1, -0.0655, 0.040 ); sp7= pt( -0.1, -0.0543, 0.032 ); sp6 = pt( -0.1, -0.0505, 0.0195 ); sp5=pt(-0.1,-.05,0); sp4 =pt( -0.1, -0.0505, -0.0195 ); sp3 = pt( -0.1, -0.0543, -0.032 ); sp2 =pt( -0.1, -0.0655, -0.04 ); sp1 = pt(-.1, -.08, -.045); sp14 =pt( -0.1, -0.0914, -0.037 ); sp13 = pt( -0.1, -0.0984, -0.0192 ); sp12 = pt(-.1, -.1, 0); sp11 = pt( -0.1, -0.0984, 0.0192 ); sp10 = pt( -0.1, -0.0914, 0.0370 ); } { body_center = uniOpCrv(cubic, array(point19a,point19, point20, point21, point22, point23, point24, point25, point26, point27, point28)); b_circ0 = objTransform(UnitCircle, sxyz(.4,.3,.3)); b_circ1 = objTransform(UnitCircle, sxyz(.9,.8,.8)); b_circ2 = objTransform(UnitCircle, sxyz(1.1,.7,.7)); b_circ3 = objTransform(UnitCircle, sxyz(.7,.4,.4)); SectionCrvs = { b_circ1,b_circ2, b_circ3}; SectionParams = {.75, .9, .95}; } body = generalSweep(body_center,SectionCrvs, SectionParams, "arc_length_blend", top_profile, true); { n_vec = vecFrom2Pts( pt(0,0,0), pt(-.13,-0.04,0) ); n_center = pt(0,-.06,0); Wfactor = 2.5; cutoff =.05; Minfo = 2; body_nose = warp(body, n_vec, n_center, Wfactor, cutoff, Minfo); t_vec = vec(.25,-.09,0); t_center = pt(.915, -0.052,0); t_Wfactor = 0; t_cutoff =.15; t_Minfo = 2; body_nose_t = warp(body_nose, t_vec, t_center, t_Wfactor, t_cutoff, t_Minfo); } } { { t_c_refine = srefine( body_nose_t, "COL", {0, 0, 0, 0.166667, 0.24, 0.26,0.333333, 0.333333, .35, .375, .4, .425, .45, 0.5, 0.58,0.59,0.6,0.61, 0.62, 0.666667, 0.666667, 0.833333,0.88, 0.89,0.9,0.91,0.92, 1, 1, 1 }, false ); t_r_refine = srefine( t_c_refine, "ROW", { 0, 0, 0, 0, 0.115459, 0.361792, 0.937985, 1, 1.81083, 1.9, 2, 2.1, 2.21083, 2.4, 2.55, 2.96986, 3, 4, 4.26894, 5, 5.51597, 5.59744, 6, 6.39744, 6.4943, 7, 7.31441, 7.71441, 7.8, 7.9, 8, 8, 8, 8 }, false ); } { #top fin extruded from body tpf_start = pt( 0.67, 0.08, 0 ); tpf_finished = pt( .8, 0.15, 0 ); tpf_vec = vecFrom2Pts(tpf_start, tpf_finished); tpf_center =tpf_start; tpf_region = polyline( pt(.65,.08,.0), pt(.7, .12, 0)); tpf_Wfactor = 3; tpf_cutoff =.009; tpf_Minfo = 1; body_nose_fin = warp(t_r_refine, tpf_vec, tpf_start, tpf_Wfactor, tpf_cutoff, tpf_Minfo ); # body_nose_fin2 = warp(body_nose_fin, tpf_vec, tpf_mid2, # tpf_Wfactor, tpf_cutoff, tpf_Minfo ); # body_nose_fin3 = warp(body_nose_fin2, tpf_vec, tpf_mid6, # tpf_Wfactor, tpf_cutoff, tpf_Minfo ); } { #side fins extruded from body ptf = srfEval(body_nose_t, 2,.4); lftf_start= ptf; lftf_finished = pt( 0.43, -0.15, .11 ); lftf_vec = vecFrom2Pts(lftf_start, lftf_finished); lftf_center =lftf_start; lftf_Wfactor = 1; lftf_cutoff = .025; lftf_Minfo = 2; body_nose_fin_lf = warp(body_nose_fin , lftf_vec, lftf_center, lftf_Wfactor, lftf_cutoff, lftf_Minfo); rghtf_start = srfEval(body_nose_t, 2,.6); rghtf_finished = pt( 0.43, -0.15, -.11 ); rghtf_vec = vecFrom2Pts(rghtf_start, rghtf_finished); rghtf_center =rghtf_start; rghtf_Wfactor = 1; rghtf_cutoff = .025; rghtf_Minfo = 2; body_nose_fin_rf = warp(body_nose_fin_lf, rghtf_vec, rghtf_center, rghtf_Wfactor, rghtf_cutoff, rghtf_Minfo); } { #tail tail_r_pt = srfEval(body_nose_fin_rf, 7.95, .7); rt_vec = vec(.125,-.045,-0.15); rt_center = tail_r_pt; rt_Wfactor = 1; rt_cutoff =.02; rt_Minfo = 2; body_nose_rt = warp( body_nose_fin_rf, rt_vec, rt_center, rt_Wfactor, rt_cutoff, rt_Minfo); lt_vec = vec(.125,-.045,0.15); lt_center = srfEval(body_nose_fin_rf, 7.95, .3); lt_Wfactor = 1; lt_cutoff =.02; lt_Minfo = 2; body_nose_lt = warp(body_nose_rt, lt_vec, lt_center, lt_Wfactor, lt_cutoff, lt_Minfo); } { # eyes s = UnitSphere; sph1 = objtransform(s, sxyz(.02,.01,.01)); setColor(sph1, "LightGrey"); sph2 = objtransform(s, sxyz(.015,.01,.01), tz(.006)); setColor(sph2, "Black"); sph3 = objtransform(s, sxyz(.015,.01,.01), tz(.009)); setColor(sph2, "Black"); s_eye=group(sph1,sph2); ss_eye=group(sph1,sph3); s_eyeL = objtransform(s_eye,ry(-14), txyz(.16,-.03,.1) ); s_eyeR = objtransform(s_eye,rx(-180), ry(14), txyz(.16,-.03,-.1) ); } {#SMILE smilept1 = pt( -0.0939172, -0.055463, 0 ); smilept2 = pt( -0.0777245, -0.0628847, 0 ); smilept3 = pt( -0.000809442, -0.0574871, 0 ); smilept4 = pt( 0.0720575, -0.0520896, 0 ); smilept5 = pt( 0.116587, -0.0615353, 0 ); smilept10 = pt( -0.0989172, -0.065463, 0 ); smilept20 = pt( -0.0777245, -0.0728847, 0 ); smilept30 = pt( -0.000809442, -0.0674871, 0 ); smilept40 = pt( 0.0720575, -0.0620896, 0 ); smilept50 = pt( 0.136587, -0.0715353, 0 ); smile_line = uniOpCrv(5, smilept1,smilept2,smilept3, smilept4,smilept5, smilept50, smilept40,smilept30,smilept20, smilept10, smilept1); plane_start_pt = pt( -0.01, 0, -0.09 ); plane_end_pt= pt( -.010,0, 0.09 ); smile_plane = extrude( smile_line, plane_start_pt, plane_end_pt, true); setColor(smile_plane, "Black"); } {#blowhole blowhole_ctr = pt( 0.204416, 0.119882, 0); hole = sphere(blowhole_ctr, .015); hole_hole = sphere(blowhole_ctr, .01); setColor(hole_hole, "DarkSlateGrey"); bhole = combineShells(body_nose_fin_rf, hole, "*"); h = combineShells(bhole, hole_hole, "-"); blowhole=objTransform(h, ty(.001)); blowholeF=objTransform(h, ty(.0025)); setColor(blowholeF, "DarkSlateGrey"); } {#Bubbles in the water bubble = objTransform(UnitSphere, sxyz(.02,.02,.02), tx(.3), ty(.2)); setColor( bubble, "SkyBlue"); setSq( bubble, "Glass"); bubble2 = objTransform(bubble,sxyz(.6,.6,.6), txyz(.15,.25,.3)); bubble3 = objTransform(bubble,sxyz(1,1,1), txyz(.1,.2,.2)); bubble4 = objTransform(bubble, sxyz(.7,.7,.7),txyz(.135,.22,.25)); bubble5 = objTransform(bubble, sxyz(.9,.9,.9),txyz(.08,.26,.2)); bubble6 = objTransform(bubble, sxyz(.6,.6,.6),txyz(.06,.17,.24)); bubble7 = objTransform(bubble, sxyz(.5,.5,.5),txyz(.05,.12,.23)); bubbs = group(bubble2,bubble3,bubble4,bubble5,bubble6,bubble7); setColor( bubbs, "SkyBlue"); setSq( bubbs, "Glass"); bubbs2 = objTransform(bubbs, rx(180),txyz(1.2,0.5,0.1)); bubbs3 = objTransform(bubbs, ry(95),txyz(.8,.7,0)); } { smileS = combineShells(body_nose_t, smile_plane, "*", true); smile = objTransform(smileS, sxyz(1.1,.9,1.2), tx(-.00)); setColor(smile, "Black"); dbh = combineShells(body_nose_fin_rf, blowhole, "-", true); } { dolphin= group(dbh, smile, s_eyeR, s_eyeL, blowholeF, bubbs); dolphin2 = objTransform(dolphin, ry(40), tx(2.1), ty(.45),tz(-2)); #dolphin3 is the baby dolphin3 = objTransform(dolphin, ry(20), tx(.70), ty(-.45),tz(.5),sxyz(.6,.6,.6)); dolphin4 = objTransform(dolphin, ry(10), tx(1.5), ty(-.95),tz(-3)); } { #Lights & background spotLightPt = pt( -0.257632, 0.378164, 0.406434 ); spotLight = lightsource(spotLightPt, .8, .2); spotLightPt2= pt( 0.534288, 0.377091, 0.144481 ); spotLight2 = lightsource(spotLightPt2, .8, .1); spotLightPt3= pt( 0.534288, -0.177091, 0.644481 ); spotLight3 = lightsource(spotLightPt3, .6, .1); sbk = objTransform(UnitSphere, sxyz(6,6,6), txyz(1,0,0)); setColor( sbk, "Navy"); setSq( sbk, "Mirror"); setTexture( sbk, "water.rle"); bk = box (pt(-10.92,-10.8,-5), vec(20,0,0), vec(0,20,0), vec(0,0,.1)); setColor( bk, "SlateBlue"); setSq( bk, "Mirror"); setTexture( bk, "water.rle"); } dumpGeomFile( {dolphin}, "/home/alpha1/wrk/gooch/a1/sum96/dolphin.a1"); dumpGeomFile( { spotLight, spotLight2, spotLight3, dolphin, dolphin2, dolphin3, dolphin4, bubbs2, bubbs3, bk }, "/home/alpha1/wrk/gooch/a1/sum96/scene.a1"); } #ray /home/alpha1/wrk/gooch/a1/sum96/view.mat.a1 /home/alpha1/wrk/gooch/a1/sum96/dolphin.a1 >! /home/alpha1/wrk/gooch/a1/sum96/dolphin.rle.Z& #ray /home/alpha1/wrk/gooch/a1/sum96/view.mat.a1 /home/alpha1/wrk/gooch/a1/sum96/scene.a1 > ! /home/alpha1/wrk/gooch/a1/sum96/scene.rle.Z & #ray view.mat.a1 scene.a1 >! scene.rle.Z& #ray scene.view1.mat.a1 scene.a1 >! scene1.rle.Z& # #ray scene.view2.mat.a1 scene.a1 >! scene2.rle.Z& #ray profile.mat.a1 dolphin.a1 >! profile.rle.Z& #ray top.mat.a1 dolphin.a1 >! top.rle.Z& #ray bottom.mat.a1 dolphin.a1 >! bottom.rle.Z& #getx11 /home/alpha1/wrk/gooch/a1/sum96/scene.rle.Z