Picking a random point along the edge of an area
Easy-peasy.  Just imagine walking around the rectangle starting at the origin in a counter-clockwise direction, and keeping track of the length traversed:

(defn random-edge-coord
  [width height]
  (let [len-1 width
        len-2 (+ width height)
        len-3 (+ (* 2 width) height)
        len-4 (* 2 (+ width height))
        pos   (rand len-4)]
    (cond
      (&lt; pos len-1) [pos 0]
      (&lt; pos len-2) [width (- pos len-1)]
      (&lt; pos len-3) [(- len-3 pos) height]
      :else [0 (- len-4 pos)])))

(defn print-1 [[x y]]
  (printf "[%3.1f %3.1f] \n" (double x) (double y)) )

(dotest
  (nl)
  (dotimes [i 10]
    (print-1 (random-edge-coord 2 3))))


with result:

[1.4 3.0] 
[0.0 0.2] 
[2.0 2.1] 
[1.2 0.0] 
[2.0 1.4] 
[1.7 0.0] 
[1.5 3.0] 
[1.5 3.0] 
[2.0 0.7] 
[1.0 3.0] 


and

[1.0 0.0] 
[1.4 0.0] 
[1.4 3.0] 
[0.5 0.0] 
[0.0 2.6] 
[2.0 2.7] 
[0.0 1.5] 
[2.0 2.8] 
[0.9 3.0] 
[1.1 3.0] 


For a more general shape, you could calculate the length breakpoints in a loop and use a loop to search them in order instead of a cond.  You could also use generalized line-segments, then interpolate so you don't depend on simply vertical/horizontal coordinates.