<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Silverlight &#124; WPF &#124; Microsoft.Net &#187; perspective 3D</title>
	<atom:link href="http://joel.neubeck.net/tag/perspective-3d/feed/" rel="self" type="application/rss+xml" />
	<link>http://joel.neubeck.net</link>
	<description>Simplifing structure without changing results</description>
	<lastBuildDate>Wed, 26 May 2010 18:43:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Perspective 3D Screen flip with PlaneProjection</title>
		<link>http://joel.neubeck.net/2009/04/perspective-3d-screen-flip-with-planeprojection/</link>
		<comments>http://joel.neubeck.net/2009/04/perspective-3d-screen-flip-with-planeprojection/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 16:31:09 +0000</pubDate>
		<dc:creator>joel</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[DoubleAnimationUsingKeyFrames]]></category>
		<category><![CDATA[perspective 3D]]></category>
		<category><![CDATA[Silverlight 3]]></category>

		<guid isPermaLink="false">http://joel.neubeck.net/?p=384</guid>
		<description><![CDATA[Almost a year ago I created a Silverlight 2 example that demonstrated how you could use a procedural animation to duplicate one of the transitions used on the iPhone. When a iPhone user goes to make a phone call, if you choose to display the keypad there is a cool 3D flip that occurs. Back [...]]]></description>
			<content:encoded><![CDATA[<p>Almost a year ago I created a Silverlight 2 example that demonstrated how you could use a procedural animation to duplicate one of the transitions used on the iPhone.  When a iPhone user goes to make a phone call, if you choose to display the keypad there is a cool 3D flip that occurs.  Back in SL2 it was a pretty lengthy animation that never quite duplicated the correct amount of 3d perspective needed to make the flip look realistic.</p>
<p>Thankfully in Silverlight 3 we now have perspective 3D which allows us to take  2D objects and rotate them in 3D space.  For this example I will use PlaneProjection to rotate a Grid with an extremely simple DoubleAnimationUsingKeyFrames.</p>
<p><a href="http://joel.neubeck.net/wp-content/uploads/2009/04/3dflip_sl3.png" border="0"><img class="alignleft size-full wp-image-385" title="3dflip_sl3" src="http://joel.neubeck.net/wp-content/uploads/2009/04/3dflip_sl3.png" alt="3dflip_sl3" width="500" border="0"/></a><br />
<br style="clear:both" /><br />
My first DoubleAnimationUsingKeyFrames simply targets the RotateY property of Grid.Projection.PlaneProjection.  The second two are used to fade  the back from opacity 0 to 1 and the front from opacity 1 to 0.</p>
<p><a href="http://joel.neubeck.net/wp-content/uploads/2009/04/3dflip_sl3_2.png" border="0"><img class="alignleft size-full wp-image-386" title="3dflip_sl3_2" src="http://joel.neubeck.net/wp-content/uploads/2009/04/3dflip_sl3_2.png" alt="3dflip_sl3_2" width="500" border="0"/></a><br />
<br style="clear:both" /></p>
<p>To get my  grid representing the back to start flipped  180 degrees I simply apply PlaneProject to it as well.</p>
<p><a href="http://joel.neubeck.net/wp-content/uploads/2009/04/3dflip_sl3_3.png" border="0"><img class="alignleft size-full wp-image-387" title="3dflip_sl3_3" src="http://joel.neubeck.net/wp-content/uploads/2009/04/3dflip_sl3_3.png" alt="3dflip_sl3_3" width="500" border="0"/></a></p>
<p><br style="clear:both" /></p>
<p>Here is the final example with nothing in the code behind except for the Flip button handler.</p>
<p><iframe src="/wp-content/uploads/2009/04/ScreenFlipv3/default.html" width="300" height="250"></iframe></p>
<p>Code: <a onclick="javascript: pageTracker._trackPageview('/code/ScreenFlipv3.zip');" href="/wp-content/uploads/2009/04/ScreenFlipv3/ScreenFlipv3.zip">ScreenFlipv3.zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://joel.neubeck.net/2009/04/perspective-3d-screen-flip-with-planeprojection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
