|
|
Download now
View the source:
Window1.xaml.cs
Window1.xaml
WpfRenderer.cs
XamlRenderer.cs
or download GeneticDNAViewer_1.0.zip (16Kb)
About the code
This code was written in response to a couple of comments
on Roger's blog. It hasn't been authorised, tested or otherwised approved by Roger - it's just a little addon to play with.
|
|
|
Wpf ~ EvoLisa "Viewer"
Modifying the "Viewer" to output Silverlight animation
I posted on my blog links to
code where I added SVG output to the EvoLisa viewer. There is a 'cool' effect when
loading the SVG in Firefox - it renders the polygons progressively which looks like
it's animated (although unintentionally, when your connection is slow).
I decided to create the same effect with the Xaml output using Silverlight with Javascript.
Watch the "EvoLisa" Opera House images reveal
by day and
by night (using silverlight html host page).
NOTE: this animation is NOT the same thing as the image evolving
as part of the EvoLisa program - it is merely gradually revealing a particular
set of polygons that have been saved by the program.
NOTE2: it uses Silverlight 1.0, so it should be fine under the recently released
Moonlight
1.0.
Step-by-step example: Sydney Opera House
Opera House by day .DNA 49Kb (ZIPped 17Kb)
Opera House by day (Silverlight 17Kb)
Opera House by day (Flickr 1920x1440 162Kb)

While I was testing the new 'DNA', I added SvgRenderer as well (needs updated Window1.xaml.cs). At first it didn't seem to work (left image) because I couldn't figure out how to make the background black. Decided to draw a big black rectangle behind the rest (bit of a hack, but it works). You can view operahouse_day.svg.xml (21Kb) in Firefox.

|
|
Useful links
Roger Alsing's EvoLisa
Original blog post.
EvoLisa FAQ
Roger's answers to frequently asked questions
Generated
Image Gallery
Images submitted to Roger for sharing
|