pl = nil(); for ( t = 0, 1 , 200, scale1 = (random(0,0.05)+0.5) : scale2 = (random(0,0.05)+0.5) : scale3 = random(0,0.05) : snoc (point( scale1 * cos(t/5), scale2 * sin(t/5), (t/50 - 1)+scale3), pl) ); cable_axis = CINTERP(pl,4,70, PARAM_UNIFORM); free(pl); cable_cut = circle (vector(0,0,0),.1); cable = sweepsrf (cable_cut, cable_axis, OFF); cable = cable * scale (vector(0.4,0.4,1.0)); free (cable_axis); free (cable_cut); hand_curve = CBEZIER( list ( ctlpt ( p3, 1.0 , 0.0 , 0.0 , 0.0), ctlpt ( p3, 1.0 , 0.2 , 0.2 , 0.0), ctlpt ( p3, 1.0 , 0.65 , 0.2 , 0.0))); hand_cut_curve = CBSPLINE ( 3, list ( ctlpt(p3,1.0,-0.1080,0.4920,0.0), ctlpt(p3,1.0,-0.424,0.496,0.0), ctlpt(p3,1.0,-0.544,0.384,0.0), ctlpt(p3,1.0,-0.48,0.036,0.0), ctlpt(p3,1.0,-0.312,-0.084,0.0), ctlpt(p3,1.0,0.080,-0.096,0.0), ctlpt(p3,1.0,0.252,0.024,0.0), ctlpt(p3,1.0,0.34,0.384,0.0), ctlpt(p3,1.0,0.22,0.496,0.0), ctlpt(p3,1.0,-0.108,0.4920,0.0)), list (0.0,0.0,0.0,3.0,4.0,5.0,6.0,7.0, 8.0,9.0,12.0,12.0,12.0)); hand_cut_curve = hand_cut_curve * trans(vector(0.102,-0.2,0.0)); hand_cut_curve = hand_cut_curve * rotz(-90.0); handle = sweepsrf ( hand_cut_curve, hand_curve, OFF); free (hand_curve); free (hand_cut_curve); handle = handle * scale (vector(2.0,1.0,0.7)); mic_profile = CBSPLINE (3, list( ctlpt (p3,1.0,-0.296,0.64,0.0), ctlpt (p3,1.0,-0.020,0.640,0.0), ctlpt (p3,1.0,0.164,0.520,0.0), ctlpt (p3,1.0,0.240,0.140,0.0), ctlpt (p3,1.0,0.236,0.052,0.0), ctlpt (p3,1.0,0.236,0.052,0.0), ctlpt (p3,1.0,0.180,0.048,0.0), ctlpt (p3,1.0,0.180,-0.028,0.0), ctlpt (p3,1.0,0.236,-0.028,0.0), ctlpt (p3,1.0,0.236,-0.028,0.0), ctlpt (p3,1.0,0.280,-0.264,0.0), ctlpt (p3,1.0,0.208,-0.352,0.0), ctlpt (p3,1.0,0.052,-0.348,0.0), ctlpt (p3,1.0,-0.016,-0.272,0.0), ctlpt (p3,1.0,-0.296,-0.272,0.0)), list(KV_OPEN)); mic_profile = mic_profile * trans(vector(0.296,-0.64,0)); mic_profile = mic_profile * rotx(90.0); mic = SURFREV (mic_profile); free (mic_profile); mic = mic * rotx(-90.0); mic = mic * trans(vector(-0.1,.25,0.0)); resolution = 20; mic = gpolygon(mic,off); handle = gpolygon(handle,off); half_phone = mic ^ handle; free(mic); free(handle); half_phone = half_phone * trans(vector(-1.3,0.0,0.0)); second_half = half_phone * scale (vector(-1.0,1.0,1.0)); hand_set = second_half ^ half_phone; free(second_half); free(half_phone); cable = cable * roty(90.0); cable = cable * trans(vector(-4.75,-0.2,0.0)); save ("phone",list(hand_set,cable)); interact(list(hand_set,cable));