restart: # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Areas of portions of a square # # # # # # # # # # # # # # # # # # # # # # # # # # # # with(plots): with(plottools): side:=6:A1:=16:A2:=20:A3:=32: # Pick a point in the square: say (x1, y1) poinC:=point([side/4,side/3]): cpoin:=op(1,%): x1:=cpoin[1]; y1:=cpoin[2]; lin[1]:=line([side/2,0],[x1,y1], color=black): lin[2]:=line([0,side/2],cpoin, color=black): lin[3]:=line([side/2,side],cpoin, color=black): lin[4]:=line([side,side/2],cpoin, color=black): #textA:=textplot([(cpoin[1]+side/2)/2,1,`A1`],align={ABOVE,RIGHT}): #textA:=textplot([(1.5+side/2)/2,1,`A1`]): tetA:=textplot([1,1.3,`A1`]): squ:= polygon([[0,0], [0,side], [side,side],[side,0]], color=white): # Plot without tetA - Lines are given plots[display]({seq(lin[i],i=1..4),squ,poinC}, scaling=constrained,axes=normal); # Plot with tetA - Lines are not given plots[display]({seq(lin[i],i=1..4),squ,tetA,poinC}, scaling=constrained,axes=normal); # Plot with tetA (placed differently) - Lines are not given plots[display]({squ,poinC,tetA,lin[1],lin[2],lin[3],lin[4]}, scaling=constrained,axes=normal);