Define LibPub mohr(x,y,τ,β)=
Prgm
setMode(2,2)
setMode(5,2)
a:=((y+x)/(2))
r:=√((x-a)^(2)+τ^(2))
setMode(1,6)
-y))))/(2))
m:=a+r
n:=a-r
If α=±45 Then
θ:=45
Else
θ:=α
EndIf
φ:=θ+45
t:=r*sin(2*β-2*θ)
If x<y Then
-r*cos(2*β-2*θ)
-2*θ)
Else
-2*θ)
-r*cos(2*β-2*θ)
EndIf
Disp "σ max =",m," σ min =",n
Disp "σ ave =",a," τ max =",r
Disp "θp =",θ,"°"," θs =",φ,"°"
EndPrgm