title: Playing with geometry?
body: <p>Does anyone have some useful beginner tutorials and code snippets for playing with basic geometric shapes and geometric proofs in code?</p>
  
  <p>In particular something with the ability to easily create functions and recursively draw them on the screen. Additional requirements, but not absolute, support for Objective-C and basic window drawing routines for OS X and Cocoa.</p>
  
  <p>A specific question how would one write a test to validate that a shape is in fact a square, triangle, etc. The idea being that you could draw a bunch of shapes, fit them together and test and analyze the emergent shape that arises from the set of sub shapes. </p>
  
  <p>This is not a homework question. I am not in school. Just wanted to experiment with drawing code and geometry. And looking for an accessible way to play and experiment with shapes and geometry programming.</p>
  
  <p>I am open to Java and Processing, or Actionscript/Haxe and Flash but would also like to use Objective C and Xcode to build projects as well.</p>
  
  <p>What I am looking for are some clear tutorials to get me started down the path.</p>
  
  <p>Some specific applications include clear examples of how to display for example parts of a Cantor Set, Mandelbrot Set, Julia set, etc...</p>
  
  <p>One aside, I was reading on Wikipedia about the "<a href="http://en.wikipedia.org/wiki/Russell%27s_paradox" rel="nofollow noreferrer">Russell's Paradox</a>". And the wiki article stated:</p>
  
  <blockquote>
    <p>Let us call a set "abnormal" if it is
    a member of itself, and "normal"
    otherwise. <strong>For example, take the set
    of all squares. That set is not itself
    a square, and therefore is not a
    member of the set of all squares.</strong> So
    it is "normal". On the other hand, if
    we take the complementary set that
    contains all non-squares, that set is
    itself not a square and so should be
    one of its own members. It is
    "abnormal".</p>
  </blockquote>
  
  <p>The point about squares seems intuitively wrong to me. All the squares added together seem to imply a larger square. Obviously I get the larger paradox about sets. But what I am curious about is playing around with shapes in code and analyzing them empirically in code. So for example a potential routine might be draw four squares, put them together with no space between them, and analyze the dimensions and properties of the new shape that they make. </p>
  
  <p>Perhaps even allowing free hand drawing with a mouse. But for now just drawing in code is fine.  </p>