title: How to determine which side of a 3D plane is showing?
body: <p>This is a 3d n00b question.</p>
  
  <p>I'm working on a WPF control which implements the basics of Silverlight's PerspectiveTransform feature, allowing a 2D plane to be rotated on any of the three axes. It works pretty well. However I'm a little stuck on the math required to determine whether or not the back of the plane is showing. My naive code for figuring that out now is:</p>
  
  <pre><code>bool isBackShowing = Math.Abs(RotationX) &gt; 90 &amp;&amp; Math.Abs(RotationY) &lt; 90;
  if (!isBackShowing)
  {
      isBackShowing = Math.Abs(RotationX) &lt; 90 &amp;&amp; Math.Abs(RotationY) &gt; 90;
  }
  </code></pre>
  
  <p>However, this fails when the rotation is between +-270 and +-360 on either axis.</p>
  
  <p>The underlying transform is using a Quaternion object to do the actual rotation, and that has nice Axis and Angle properties, so I'm guessing I could just use that if I knew how.</p>