peng= Graphics RGBColor 0, 0, 1, Rectangle,0, 2, 33 1 Forx=0.6;i= X;long0=100,x<Pi/2,x+=0.04, x0=2+3/anx;y0=3+2*Tanx]; long-Sqrtx0*x0+y0*yol; ti=GraphicsrgbColor( 1, 0,0 Line{0y0},{x0,0}}; Showlpeng, ti, Axes->True, AspectRatio->1 Plotrange>{0,8},{0,8} Ifllong<longo, longo=long; i=x]; Printl"long==",longl Print"shortest leng gth==,longo, ",i180/Pi11 peng=Graphics[{RGBColor[0,0,1], Rectangle[{0,0},{2,3}]}] For[x=0.6;i=x;long0=100,x<Pi/2,x+=0.04, x0=2+3/Tan[x]; y0=3+2*Tan[x]; long=Sqrt[x0*x0+y0*y0]; ti=Graphics[{RGBColor[1,0,0], Line[{{0,y0},{x0,0}}]}]; Show[peng,ti,Axes->True,AspectRatio->1, PlotRange->{{0,8},{0,8}}]; If[long<long0,long0=long;i=x]; Print["Long==",long]] Print["shortest length==",long0, " i==",i 180/Pi]