Home     Bezier     Filmstrip     BBQ VE

Bezier Calculator

           In learning WFP and Silverlight I wanted to focus on animations and how they can be changed during runtime.  I found the bezier curve as it relates to the bouncing ball a good way to practice.  First I ported the code from this post  to current WPF (source , screen ).  Then I started from scratch an did the whole thing in Silverlight
            I was quite suprised how different WPF and Silverlight were regarding animations.  On the WPF version, to change the animation I had to null out the current one, create one from scratch and reapply it to the property.  In silverlight it was much easier. after stopping the animation I simply created a new SplineKeyFrame using CreateFromXAML and replaced the Keyframe.  After starting it the changes took affect.Source For SL Version

How to Use the Calculator

There are 2 ways to use the calculator.
1) Drag the control points around
2) Add the spline to the query string (EX: ?X1=.2&Y1=.8&X2=.8&Y2=.9)
Dragging and dropping got tricky around the edges and I'm still working that out.

Here is an example spline Bouncing
This is alpha 1.1 written in VS 2008 beta 1.