0

In XAML, the ProjectionPlane is used pivot an element on a three-dimensional axis. For example if I wanted to tilt the right edge of a rectangle toward me, I do this:

<!-- zero rotation -->
<Rectangle Fill="White" Height="200" Width="200">
    <Rectangle.Projection>
        <PlaneProjection RotationY="0" />
    </Rectangle.Projection>
</Rectangle>

<!-- 45 deg rotation -->
<Rectangle Fill="White" Height="200" Width="200">
    <Rectangle.Projection>
        <PlaneProjection RotationY="45" />
    </Rectangle.Projection>
</Rectangle>

<!-- 85 deg rotation -->
<Rectangle Fill="White" Height="200" Width="200">
    <Rectangle.Projection>
        <PlaneProjection RotationY="85" />
    </Rectangle.Projection>
</Rectangle>

The resulting rectangle(s) would look like this:

enter image description here

So far so good. Here's my problem. As the angle increases closer to 90 degrees, the rectangle is skewed more and more. Is there a property or technique that could allow the ProjectionPlane to rotate along the Y axis all the way to 90 degrees but reduce the scewing (or change the field of view)?

In other words, the angle from the back corners to the from corners would be decreased and as a result if the rectangle had content in it, it would be more discernible.

Here's a before and after to make the question as clear as possible. On the left is what I get. On the right is what I want. It is slightly exaggerated to make the point. I hope this makes sense.

enter image description here

Jerry Nixon
  • 31,313
  • 14
  • 117
  • 233

1 Answers1

1

Unfortunately PlaneProjection doesn't allow you change projection matrix. To get control over projection you would have to go with Matrix3DProjection. You can use sample code provided in the documentation or you could look into porting Matrix3DEx library to WinRT.

One more thing you can try is to push your object back along Z axis and scale it up so it keeps it size. Since object would be further away from the camera it would show less distortion on flip.

BTW Accordingly to Jaime Rodriguez fov for PlaneProjection is set to 57 degrees, a bit wide for most displays.

Denis
  • 4,115
  • 1
  • 18
  • 20