Showing posts with label Silverlight. Show all posts
Showing posts with label Silverlight. Show all posts

Monday, October 20, 2008

LOLCats Slide Show in Silverlight




This is a simple slide show viewer written in Silverlight, currently featuring some lolcats images. The slide show viewer can be configured to view any images, I chose lolcats for this example just because of their popularity. Currently, this slide show viewer only supports a cross-fade style transition. In the future, I plan on added enhancements which will include a variety of transition types. This initial version serves as a decent baseline that can easily be built upon.

In this example, slides will automatically transition after being displayed for 5 seconds. In order to force a transition, simply click on the image.

The source code for the project can be found here.

Feel free to comment!

-Ken

Sunday, September 21, 2008

Koch Snowflake in Silverlight




This program builds on the Koch curve, with the key difference being the initial state contains an equilateral triangle instead of a single line segment, and the snowflake is constructed by generating the Koch curve on each side of the triangle.

The source code is available at CodePlex.

Feel free to comment!

-Ken

Saturday, September 20, 2008

Koch Curve in Silverlight




Here's another one of my favorite fractals, the Koch curve! Generating this is simple:

  • Start with a straight line segment
  • Insert an equilateral triangle in the center of the line segment
  • Repeat this process for each new line segment

The source code is available at CodePlex.

Feel free to comment!

-Ken

Monday, September 15, 2008

Sierpinski's Triangle in Silverlight




Here's a fractal gem that's stuck with me since my discrete math days. Generating this fractal is simple:

  • Pick a random point.
  • Choose a random number from 1 to 3, each representing a point on a triangle.
  • Plot the midpoint between the first chosen point and the randomly selected point on the triangle. The color of the point can be different for each of the three points on the triangle.
  • Choose another random point on the triangle (1-3) and plot the midpoint between it and the previous point plotted.
  • Repeat the previous step (forever!)
The result is Sierpinski's Triangle! Click on the Silverlight app to clear the plotted points.

Note that the EditableImage class from Joe Stegman's Silverlight.Samples module was used in this project since it provides an efficient way to plot points on a 2-D plane. You can read more about it here.

The source code for this project is also available for download at CodePlex.

Feel free to comment!