<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/" version="2.0">
    <channel>
        <title>The Infinite Foray</title>
        <link>http://kemmis.info/blog/Default.aspx</link>
        <description>A blog discussing down to Earth ms dot net instruction, news, and gotchas.</description>
        <language>en-US</language>
        <copyright>Rafe Kemmis</copyright>
        <managingEditor>rafe@surfingdogsoft.com</managingEditor>
        <generator>Subtext Version 1.9.5.177</generator>
        <image>
            <title>The Infinite Foray</title>
            <url>http://kemmis.info/blog/images/RSS2Image.gif</url>
            <link>http://kemmis.info/blog/Default.aspx</link>
            <width>77</width>
            <height>60</height>
        </image>
        <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/TheInfiniteForay" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
            <title>Silverlight Math Creativity Part II.II</title>
            <category>Silverlight</category>
            <link>http://kemmis.info/blog/archive/2009/06/12/silverlight-math-creativity-part-ii.ii.aspx</link>
            <description>&lt;p&gt;This is the second part of the Glen Rhodes animation section in my Silverlight Math Creativity blog series. In today’s post I recreated several more of Rhodes’ flower animations. To view the first half of the flower animations, go read my &lt;a href="http://kemmis.info/blog/archive/2009/05/14/silverlight-math-creativity-part-ii.aspx"&gt;previous post&lt;/a&gt; from the series. If you want to start at the beginning of the series, you can check out the &lt;a href="http://kemmis.info/blog/archive/2009/05/04/silverlight-math-creativity-part-i.aspx"&gt;first post here&lt;/a&gt;.&lt;/p&gt;  &lt;h3&gt;&lt;/h3&gt;  &lt;h3&gt;Flower Version 8&lt;/h3&gt;  &lt;p&gt;In this version of the flower animation I elongated the petal and changed the fill and stroke colors using Blend. The animation code changed slight as well. The rotation speed of the petal is now set to a random value between –2 and 2, so petals are rotating clockwise and anti-clockwise. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/FlashMathCreativity/8/1/"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://kemmis.info/blog/images/kemmis_info/blog/WindowsLiveWriter/09c22ec31da5_BC1E/image_5.png" width="512" height="307" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/FlashMathCreativity/8/1/"&gt;Click here to view the animation.&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/FlashMathCreativity/8/1/Rhodes_Flower1.8.zip"&gt;Click here to download the source code.&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;h3&gt;Flower Version 9&lt;/h3&gt;  &lt;p&gt;In this flower animation the petals do not rotate. This causes the petals to shoot straight out from the center. The opacity and scale get animated though, so ever frame each petal gets larger and more transparent.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/FlashMathCreativity/8/2/"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://kemmis.info/blog/images/kemmis_info/blog/WindowsLiveWriter/09c22ec31da5_BC1E/image_8.png" width="515" height="307" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/FlashMathCreativity/8/2/"&gt;Click here to view the animation.&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/FlashMathCreativity/8/2/Rhodes_Flower1.9.zip"&gt;Click here to download the source code.&lt;/a&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;h3&gt;Flower Version 10&lt;/h3&gt;  &lt;p&gt;In this animation the starting scale of each petal varies randomly between 0 and 1. I also set the max scale to be 2, which allows the petals to take up the entire screen.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/FlashMathCreativity/8/3/"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://kemmis.info/blog/images/kemmis_info/blog/WindowsLiveWriter/09c22ec31da5_BC1E/image_11.png" width="508" height="322" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/FlashMathCreativity/8/3/"&gt;Click here to view the animation.&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/FlashMathCreativity/8/3/Rhodes_Flower1.10.zip"&gt;Click here to download the source code.&lt;/a&gt; &lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;h3&gt;Flower Version 11&lt;/h3&gt;  &lt;p&gt;I wasn’t quite able to replicate what Rhodes describes for version 11. In his example he manages to keep the petals very small while they rush past you. Since the scale of the petal has to increase in order for the petal to be farther from the center, I don’t see how you can keep the petal small w/o changing the logic of the animation entirely.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/FlashMathCreativity/8/4/"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://kemmis.info/blog/images/kemmis_info/blog/WindowsLiveWriter/09c22ec31da5_BC1E/image_16.png" width="515" height="326" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/FlashMathCreativity/8/4/"&gt;Click here to view the animation.&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/FlashMathCreativity/8/4/Rhodes_Flower1.11.zip"&gt;Click here to download the source code.&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;h3&gt;FIN&lt;/h3&gt;  &lt;p&gt;I will be wrapping up the Rhodes flower section of the book in my next blog post. Stay tuned!&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:b555a229-f92c-4b2f-b53b-984006c7b074" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Silverlight" rel="tag"&gt;Silverlight&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Flash" rel="tag"&gt;Flash&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Animation" rel="tag"&gt;Animation&lt;/a&gt;&lt;/div&gt;&lt;img src="http://kemmis.info/blog/aggbug/55.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rafe Kemmis</dc:creator>
            <guid>http://kemmis.info/blog/archive/2009/06/12/silverlight-math-creativity-part-ii.ii.aspx</guid>
            <pubDate>Fri, 12 Jun 2009 16:12:10 GMT</pubDate>
            <wfw:comment>http://kemmis.info/blog/comments/55.aspx</wfw:comment>
            <comments>http://kemmis.info/blog/archive/2009/06/12/silverlight-math-creativity-part-ii.ii.aspx#feedback</comments>
            <wfw:commentRss>http://kemmis.info/blog/comments/commentRss/55.aspx</wfw:commentRss>
            <trackback:ping>http://kemmis.info/blog/services/trackbacks/55.aspx</trackback:ping>
        </item>
        <item>
            <title>Animating A Silverlight BezierSegment</title>
            <category>Silverlight</category>
            <link>http://kemmis.info/blog/archive/2009/05/16/animating-a-silverlight-beziersegment.aspx</link>
            <description>&lt;p&gt;This afternoon I was impressed by an element on the &lt;a href="http://www.ceranco.com/" target="_blank"&gt;Ceranco website&lt;/a&gt; that behaved like a wave of water. I started to wonder how I would be able to recreate the look of the wave animation in code. So I just dove in and started to play in Silverlight. &lt;/p&gt;  &lt;p&gt;After about an hour I had this nice wave animation in Silverlight that I think would make a pretty sweet pre-loader:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/PathPlay/"&gt;&lt;img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="289" alt="image" src="http://kemmis.info/blog/images/kemmis_info/blog/WindowsLiveWriter/AnimatedASilverlightBezierSegment_10FAA/image_3.png" width="530" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/PathPlay/"&gt;Click here to view the animation.&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/PathPlay/PathPlay.zip"&gt;Click here to download the source code.&lt;/a&gt; &lt;/p&gt;  &lt;h3&gt;So how does it work?&lt;/h3&gt;  &lt;p&gt;The key to this animation is the use of a custom path that I made, it is the element that is filled with the blue gradient. No, I didn’t create this Path in Blend. I created it with code. The curved line across the top is a BezierSegment which has three points that get animated up and down throughout the animation using Math.Sin and Math.Cos.&lt;/p&gt;  &lt;p&gt;Just like all the other animations I have done, I subscribe to the CompositionTarget.Rendering event. Inside this event is where all the heavy-lifting is done. A variable name &lt;em&gt;degree&lt;/em&gt; is incremented every time the event fires, and &lt;em&gt;degree&lt;/em&gt; is passed to the math functions to calculate the new positions of the animated elements.&lt;/p&gt;  &lt;p&gt;If you want to know more, &lt;a href="http://kemmis.info/silverlight/animations/PathPlay/PathPlay.zip"&gt;take a look at the code&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Thanks for reading!&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;   &lt;/p&gt;&lt;div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:1da0cc6b-b955-4ff8-aed5-ff48792c053d" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Silverlight" rel="tag"&gt;Silverlight&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Animation" rel="tag"&gt;Animation&lt;/a&gt;,&lt;a href="http://technorati.com/tags/BezierSegment" rel="tag"&gt;BezierSegment&lt;/a&gt;&lt;/div&gt;&lt;img src="http://kemmis.info/blog/aggbug/54.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rafe Kemmis</dc:creator>
            <guid>http://kemmis.info/blog/archive/2009/05/16/animating-a-silverlight-beziersegment.aspx</guid>
            <pubDate>Sat, 16 May 2009 23:21:37 GMT</pubDate>
            <wfw:comment>http://kemmis.info/blog/comments/54.aspx</wfw:comment>
            <comments>http://kemmis.info/blog/archive/2009/05/16/animating-a-silverlight-beziersegment.aspx#feedback</comments>
            <wfw:commentRss>http://kemmis.info/blog/comments/commentRss/54.aspx</wfw:commentRss>
            <trackback:ping>http://kemmis.info/blog/services/trackbacks/54.aspx</trackback:ping>
        </item>
        <item>
            <title>Silverlight Math Creativity Part II</title>
            <category>Silverlight</category>
            <link>http://kemmis.info/blog/archive/2009/05/14/silverlight-math-creativity-part-ii.aspx</link>
            <description>&lt;p&gt;This begins part two of my Silverlight animation series where I am recreating the animations that are described in the book &lt;a href="http://www.amazon.com/gp/product/1590594290?ie=UTF8&amp;amp;tag=infifora-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=1590594290" target="_blank"&gt;Flash Math Creativity&lt;/a&gt;. Everything in part two of my series is from the second section of the book, which is authored by &lt;a href="http://www.glenrhodes.com" target="_blank"&gt;Glen Rhodes&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you want to go back and view posts from part I of the series you can find a listing of all the posts in the &lt;a href="http://kemmis.info/blog/toc/" target="_blank"&gt;Table of Contents&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Flowers Version 1&lt;/h3&gt;
&lt;p&gt;This first example demonstrates how you can layout instances of the flower petal at random scales and random angles of rotation. There really isn’t any animation yet, but at this point you’re only concerned with creating some sort of petal looking Path using Blend, and then getting them placed initially within the LayoutRoot.&lt;/p&gt;
&lt;p&gt;I made the animation redraw the flower every 2 seconds so you can see that the petals are actually scaled and rotated randomly.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/FlashMathCreativity/7/1/"&gt;&lt;img width="514" height="321" border="0" title="image" style="border: 0px none ; display: inline;" alt="image" src="http://kemmis.info/blog/images/kemmis_info/blog/WindowsLiveWriter/SilverlightMathCreativityPartII_128E6/image_3.png" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/FlashMathCreativity/7/1/"&gt;View version 1 here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/FlashMathCreativity/7/1/Rhodes_Flower1.1.zip"&gt;Download the source code here.&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt; &lt;/h3&gt;
&lt;h3&gt;Flowers Version 2&lt;/h3&gt;
&lt;p&gt;In this second version of the flower I again randomly scale and rotate the petals. However, I don’t add them to the LayoutRoot in the order I create them. I first sorted the petals from largest scale to smallest scale, and then added them to LayoutRoot in that order. This caused the smallest petals to be in front of of the larger ones. Again, no real animation is happening yet.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/FlashMathCreativity/7/2/"&gt;&lt;img width="513" height="331" border="0" title="image" style="border: 0px none ; display: inline;" alt="image" src="http://kemmis.info/blog/images/kemmis_info/blog/WindowsLiveWriter/SilverlightMathCreativityPartII_128E6/image_6.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/FlashMathCreativity/7/2/"&gt;View version 2 here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/FlashMathCreativity/7/2/Rhodes_Flower1.2.zip"&gt;Download the source code here.&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Flowers Version 3&lt;/h3&gt;
&lt;p&gt;In version 3 I set the rotation and scale incrementally so that everything is spaced nicely. I also added the petals to the stage in order from largest scale to smallest so that the smaller petals were in front.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/FlashMathCreativity/7/3/"&gt;&lt;img width="513" height="340" border="0" title="image" style="border: 0px none ; display: inline;" alt="image" src="http://kemmis.info/blog/images/kemmis_info/blog/WindowsLiveWriter/SilverlightMathCreativityPartII_128E6/image_9.png" /&gt;&lt;/a&gt;  &lt;/p&gt;
&lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/FlashMathCreativity/7/3/"&gt;View version 3 here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/FlashMathCreativity/7/3/Rhodes_Flower1.3.zip"&gt;Download the source code here.&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt; &lt;/h3&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h3&gt;Flowers Version 4&lt;/h3&gt;
&lt;p&gt;In version 4 I tweaked the fill and stroke of the petal Path. I also changed the RenderTransformOrigin to be "0.65,-0.5" so that it would cause the petal to rotate farter out from where the origin of rotation is. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/FlashMathCreativity/7/4/"&gt;&lt;img width="509" height="356" border="0" title="image" style="border: 0px none ; display: inline;" alt="image" src="http://kemmis.info/blog/images/kemmis_info/blog/WindowsLiveWriter/SilverlightMathCreativityPartII_128E6/image_12.png" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/FlashMathCreativity/7/4/"&gt;View version 4 here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/FlashMathCreativity/7/4/Rhodes_Flower1.4.zip"&gt;Download the source code here.&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt; &lt;/h3&gt;
&lt;h3&gt;Flower Version 5&lt;/h3&gt;
&lt;p&gt;In version 5 I changed the way I initialized the scale and rotation of the pedals. The scale and rotation in this example were calculated using the loop-control-variable (i) so that each has its own unique scale and rotation, but the values are not random.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/FlashMathCreativity/7/5/"&gt;&lt;img width="510" height="361" border="0" title="image" style="border: 0px none ; display: inline;" alt="image" src="http://kemmis.info/blog/images/kemmis_info/blog/WindowsLiveWriter/SilverlightMathCreativityPartII_128E6/image_15.png" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/FlashMathCreativity/7/5/"&gt;View version 5 here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/FlashMathCreativity/7/5/Rhodes_Flower1.5.zip"&gt;Download the source code here.&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt; &lt;/h3&gt;
&lt;h3&gt;Flowers Version 6&lt;/h3&gt;
&lt;p&gt;Finally some animation! In this animation each petal increments its rotation every frame. The smaller the petal is, the faster it rotates.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/FlashMathCreativity/7/6/"&gt;&lt;img width="505" height="328" border="0" title="image" style="border: 0px none ; display: inline;" alt="image" src="http://kemmis.info/blog/images/kemmis_info/blog/WindowsLiveWriter/SilverlightMathCreativityPartII_128E6/image_18.png" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/FlashMathCreativity/7/6/"&gt;View version 6 here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/FlashMathCreativity/7/6/Rhodes_Flower1.6.zip"&gt;Download the source code here.&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt; &lt;/h3&gt;
&lt;h3&gt; &lt;/h3&gt;
&lt;h3&gt; &lt;/h3&gt;
&lt;h3&gt;Flowers Version 7&lt;/h3&gt;
&lt;p&gt;The final animation for today is the same as version 6, but there is an additional scaling of the petals every frame. Once the petals reach a certain size, I have them return to a scale of 0, and I move them to the front using Canvas.SetZIndex. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/FlashMathCreativity/7/7/"&gt;&lt;img width="502" height="343" border="0" title="image" style="border: 0px none ; display: inline;" alt="image" src="http://kemmis.info/blog/images/kemmis_info/blog/WindowsLiveWriter/SilverlightMathCreativityPartII_128E6/image_21.png" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/FlashMathCreativity/7/7/"&gt;View version 7 here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/FlashMathCreativity/7/7/Rhodes_Flower1.7.zip"&gt;Download the source code here.&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt; &lt;/h3&gt;
&lt;h3&gt;More Flowers Coming Soon!&lt;/h3&gt;
&lt;p&gt;The next post will have the second half of Glen Rhodes’ flower animations. Some of them are pretty trippy, so keep an eye out!&lt;/p&gt;
&lt;p&gt;Thanks for reading!&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Edit&lt;/span&gt;: You can read the next post in the animation series &lt;a href="http://kemmis.info/blog/archive/2009/06/12/silverlight-math-creativity-part-ii.ii.aspx"&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:6cef9391-0eb9-4426-ac86-987761631cb0" style="margin: 0px; padding: 0px; display: inline; float: none;"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Silverlight" rel="tag"&gt;Silverlight&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Animation" rel="tag"&gt;Animation&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Flash" rel="tag"&gt;Flash&lt;/a&gt;&lt;/div&gt;&lt;img src="http://kemmis.info/blog/aggbug/53.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rafe Kemmis</dc:creator>
            <guid>http://kemmis.info/blog/archive/2009/05/14/silverlight-math-creativity-part-ii.aspx</guid>
            <pubDate>Fri, 15 May 2009 01:43:04 GMT</pubDate>
            <wfw:comment>http://kemmis.info/blog/comments/53.aspx</wfw:comment>
            <comments>http://kemmis.info/blog/archive/2009/05/14/silverlight-math-creativity-part-ii.aspx#feedback</comments>
            <wfw:commentRss>http://kemmis.info/blog/comments/commentRss/53.aspx</wfw:commentRss>
            <trackback:ping>http://kemmis.info/blog/services/trackbacks/53.aspx</trackback:ping>
        </item>
        <item>
            <title>Silverlight Math Creativity Part I.V</title>
            <category>Silverlight</category>
            <link>http://kemmis.info/blog/archive/2009/05/13/silverlight-math-creativity-part-i.v.aspx</link>
            <description>&lt;p&gt;For those of you that haven’t been following along, I’ve been recreating the animations from the book &lt;a href="http://www.amazon.com/gp/product/1590594290?ie=UTF8&amp;amp;tag=infifora-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=1590594290"&gt;Flash Math Creativity&lt;/a&gt;, using Silverlight. This is the final example from the first section of the book which is authored by &lt;a href="http://nooflat.nu/"&gt;Jamie MacDonald&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;In this animation there is a grid of red balls. Each ball renders its color and scale based using Math.Sin, passing its current “degree” value to the function. This results in a number between –1 and 1. You use this value to calculate the current color and scale. By manipulating the balls’ initial degree value, you can change the direction that the wave of color moves.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/FlashMathCreativity/6/"&gt;&lt;img height="236" border="0" width="240" title="image" style="border: 0px none ; display: inline;" alt="image" src="http://kemmis.info/blog/images/kemmis_info/blog/WindowsLiveWriter/SilverlightMathCreativityPartI.V_130CF/image_3.png" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/FlashMathCreativity/6/"&gt;View the animation here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/FlashMathCreativity/6/MacDonaldAnimation_SineGrid.zip"&gt;Download the source code here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I learned a few things while creating this animation. First, if you ever need to keep an object (an ellipse in this case) centered when you apply a scale transform, you can set the &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.uielement.rendertransformorigin.aspx" target="_blank"&gt;RenderTransformOrigin&lt;/a&gt; property on the object to “0.5,0.5”. In previous animations I dealt with this problem by manually calculating and setting the centered position.&lt;/p&gt;
&lt;p&gt;In this animation I was also able to tackle the manipulation of the color and opacity of the balls. In previous examples I wasn’t able to obtain the same color effects that MacDonald created using the ColorTransform class that ActionScript provides you.&lt;/p&gt;
&lt;p&gt;Just for fun, I added a Slider to the top of the Silverlight movie that allows you to control the speed of the animation. This is nice because you can slow the animation down to get a better look at how the color and scale of the balls is changing.&lt;/p&gt;
&lt;p&gt;In my next post I will begin recreating some really trippy spiral animations from the second part of the book. These animations are going to be wicked, so stick around!&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Edit:&lt;/span&gt; &lt;a href="http://kemmis.info/blog/archive/2009/05/14/silverlight-math-creativity-part-ii.aspx"&gt;View the next part of the Silverlight Math Creativity series here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:7fd8c140-ead1-4ad8-a3b1-6c8c0ec8d8d9" style="margin: 0px; padding: 0px; display: inline; float: none;"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Silverlight" rel="tag"&gt;Silverlight&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Animation" rel="tag"&gt;Animation&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Flash" rel="tag"&gt;Flash&lt;/a&gt;&lt;/div&gt;&lt;img src="http://kemmis.info/blog/aggbug/52.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rafe Kemmis</dc:creator>
            <guid>http://kemmis.info/blog/archive/2009/05/13/silverlight-math-creativity-part-i.v.aspx</guid>
            <pubDate>Thu, 14 May 2009 01:48:13 GMT</pubDate>
            <wfw:comment>http://kemmis.info/blog/comments/52.aspx</wfw:comment>
            <comments>http://kemmis.info/blog/archive/2009/05/13/silverlight-math-creativity-part-i.v.aspx#feedback</comments>
            <wfw:commentRss>http://kemmis.info/blog/comments/commentRss/52.aspx</wfw:commentRss>
            <trackback:ping>http://kemmis.info/blog/services/trackbacks/52.aspx</trackback:ping>
        </item>
        <item>
            <title>Silverlight Math Creativity Part I.IV</title>
            <category>Silverlight</category>
            <link>http://kemmis.info/blog/archive/2009/05/13/silverlight-math-creativity-part-i.iv.aspx</link>
            <description>&lt;p&gt;Today I bring you another Silverlight implementation of a &lt;a href="http://nooflat.nu/"&gt;Jamie MacDonald&lt;/a&gt; animation from the book &lt;a href="http://www.amazon.com/gp/product/1590594290?ie=UTF8&amp;amp;tag=infifora-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=1590594290"&gt;Flash Math Creativity&lt;/a&gt;. This is the “Right To Left” animation which uses sine and cosine in order to oscillate the ball scale and horizontal-position. The combination of the horizontal and scale animation gives the illusion that the balls are moving toward you and away from you, or orbiting around a point in a 3d space.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://kemmis.info/silverlight/animations/FlashMathCreativity/5/"&gt;&lt;img height="323" border="0" width="524" style="border-width: 0px; display: inline;" title="image" alt="image" src="http://kemmis.info/blog/images/kemmis_info/blog/WindowsLiveWriter/44736b7f6a47_9CF1/image_5.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;View the animation here: &lt;a href="http://kemmis.info/silverlight/animations/FlashMathCreativity/5/"&gt;Right To Left Animation&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Download the source code here: &lt;a href="http://kemmis.info/silverlight/animations/FlashMathCreativity/5/MacDonaldAnimations_RightToLeft.zip"&gt;Right To Left Animation Source Code&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;In my next post I will bring you the final MacDonald animation implemented in Silverlight. Check back soon!&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Edit: &lt;/span&gt;&lt;a href="http://kemmis.info/blog/archive/2009/05/13/silverlight-math-creativity-part-i.v.aspx"&gt;View Part I.V of the Silverlight Math Creativity series here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;div style="margin: 0px; padding: 0px; display: inline; float: none;" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:9b4dadbb-44c1-471c-a049-93e395fc642d" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Silverlight" rel="tag"&gt;Silverlight&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Animation" rel="tag"&gt;Animation&lt;/a&gt;&lt;/div&gt;&lt;img src="http://kemmis.info/blog/aggbug/51.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rafe Kemmis</dc:creator>
            <guid>http://kemmis.info/blog/archive/2009/05/13/silverlight-math-creativity-part-i.iv.aspx</guid>
            <pubDate>Wed, 13 May 2009 15:28:56 GMT</pubDate>
            <wfw:comment>http://kemmis.info/blog/comments/51.aspx</wfw:comment>
            <comments>http://kemmis.info/blog/archive/2009/05/13/silverlight-math-creativity-part-i.iv.aspx#feedback</comments>
            <wfw:commentRss>http://kemmis.info/blog/comments/commentRss/51.aspx</wfw:commentRss>
            <trackback:ping>http://kemmis.info/blog/services/trackbacks/51.aspx</trackback:ping>
        </item>
    </channel>
</rss>
