title: SVG - How to crop an image to a circle?
body: <p>I am somewhat of a noob to SVG, but I've been playing with D3 and have started to undestand the basics.</p>
  
  <p>What I am trying to achieve is to take a square image and crop it to a circle - which is going to be representing a node on tree I am trying to draw.</p>
  
  <p>I was able to achieve this effect by creating a pattern for each image, then filling the nodes with the pattern. However, the performance on this approach was terrible when there are more than a handfull of nodes on the tree.</p>
  
  <p>So, I am looking for a different approach. I can put a regular "image" object in as my nodes, but they just come out as plain rectangles, obviously, and I'd like to render them as circles. Anyone have any advice on how to either mask/crop the image to achieve the effect I want while maintaining performance?</p>