title: Generate random coordinates from area outside of a rectangle?
body: <p>I'm working on a simple tutorial, and I'd like to randomly generate the positions of the red and green boxes in the accompanying images anywhere inside the dark gray area, but not in the white area.  Are there any particularly elegant algorithms to do this?  There are some hackish ideas I have that are really simple (continue to generate while the coordinates are not outside the inside rectangle, etc.), but I was wondering if anyone had come up with some neat solutions.</p>
  
  <p>Thanks for any help!</p>
  
  <p><img src="https://i.imgur.com/xqhyz.png" alt="alt text"></p>