rem ANG_2PL.CDL rem Copy Right by International Technology Transfer Corp. rem Angle between 2 planes rem 1. Select 2 planes rem 2. Show the intersection angle rem revision 1.0-7/30/99 clear dspflg = 1 :start getplane "Select First Method To Set Plane", dspflg on (@key + 3) goto exit, start, a1 = @fltdat[10] b1 = @fltdat[11] c1 = @fltdat[12] d1 = @fltdat[13] getplane "Select Second Method To Set Plane", dspflg on (@key + 3) goto exit, start, a2 = @fltdat[10] b2 = @fltdat[11] c2 = @fltdat[12] d2 = @fltdat[13] bunbo = sqrt((a1 * a1 + b1 * b1 + c1 * c1) * (a2 * a2 + b2 * b2 + c2 * c2)) naiseki = a1 * a2 + b1 * b2 + c1 * c2 theta = acos( naiseki / bunbo ) if (theta>90) theta = 180 - theta pause "Angle between Two planes = %.5f ", theta redraw goto start :exit