Mesh analysis 3

(with one super mesh)
.PS
include(pstricks.m4)

scale=25.4  # scale factor for the diagram

cct_init

vsp=30  # vertical spacing
hsp=30  # horizontal spacing

O: (0,0)  # origin point for the circuit diagram

move to O

R1: resistor(up_ vsp);llabel(,R_1{=}500\;\Omega,)
{ # Push current location to the "stack"
  dot(at Here)
  line up vsp
  R2: resistor(right_ hsp);llabel(,R_2{=}2\;\text{k}\Omega,)
  V1: source(right_ hsp,V,,R);llabel(,v_s{=}5\;\text{V},)
  arrowline(down_ to (Here.x,R1.end.y));llabel(,,)
  dot(at Here)
} # Return to the previous location on the "stack"
line right to ((1/2 between R2 and V1).x,Here.y)
{ # Push current location to the "stack"
  dot(at Here)
  I1: source(down_ to (Here.x,O.y),I);rlabel(,i_s,);llabel(,1\;\text{mA},)
  dot(at Here)
} # Return to the previous location on the "stack"
R3: resistor(right_ to (V1.end.x,Here.y));llabel(,R_3{=}\numprint{0.5}\;\text{k}\Omega,)
R4: resistor(down_ to (Here.x,O.y));llabel(,R_4{=}\numprint{1.5}\;\text{k}\Omega,)
line left to O

# Use splines to draw the mesh and super mesh currents
Is1: spline 1 thick 0.3 from R1.end+(hsp/4,vsp/4) to R2.start +(hsp/4,-vsp/4) \
      then to V1.end+(-hsp/4,-vsp/4) then to R3.end+(-hsp/4,vsp/4) \
      then to R1.end+(hsp/2,vsp/4) ->; "$i_1$" rjust

Is2: spline 1 thick 0.3 from R1.start+(hsp/4,vsp/4) to R1.end +(hsp/4,-vsp/4) \
      then to I1.start+(-hsp/3,-vsp/4) then to I1.end+(-hsp/3,vsp/4) \
      then to  R1.start+(hsp/2,vsp/4) ->; "$i_2$" rjust

Is3: spline 1 thick 0.3  from R1.start+(hsp/8,vsp/8) to R1.end +(hsp/8,-vsp/8) \
      then to R3.end+(-hsp/8,-vsp/8) then to R4.end+(-hsp/8,vsp/12) \
      then to  R1.start+(hsp/2,vsp/12) ->; "$i_3$" rjust

"\huge $i_x$" at (1/2 between V1.end and R3.end) ljust

.PE