Pages Menu
TwitterRssFacebook
Categories Menu

Posted by on 29th August, 2013

Mesmerizing dots

Mesmerizing dots

I saw on Reddit a post titled Mesmerizing and it was just a gif with some coloured dots in motion in a particular pattern. It was quite intriguing and I found myself staring at the thing for more than I am willing to admit. So, it was almost midnight, I am thinking, I can probably do this in a cople of hours… right? Right? Sure, it would be a fun experiment in Javascript. And there goes my sleep… Update: note quite finished, but I think I going in the right direction. Very little code: a loop that runs 18 times, creates the dots and animation, while the index rotates the layer that the dot is animating on by 20. I need to get the timing of the individual dots right and perhaps also the changing of colors. Notice how all the dots just move up and down a static line. 18 dots, 18 lines angled at 20 degrees from eachother. I added a toggle button so you can see...

Read More

Posted by on 28th January, 2013

Single Arm Clock in HTML 5

Single Arm Clock in HTML 5

I t has been a long time since I have written an experiment and even longer since I have written any blog post, so here is my comeback. Now, I had already done a few experiments, but never one with HTML 5, so what better way than to try to implement an existing one? I took the Single Arm Clock and started playing with it. The Continue Time clock is an original, physical wall clock by artist Sander Muller. I had already tried this experiment this in Silverlight a long time ago, so let’s try this in HTML5. For this experiment, I decided to use the Kinetic JS framework, since it handles a lot of the manual work to working with Canvas objects. Toggle clock speed It didn’t go as smooth as I thought, nor nearly as fast as I had hoped. I don’t know why. Maybe I am getting rusty. My weekend is over and I am posting what I have. The most difficult part, which is to...

Read More

Posted by on 18th January, 2010

Wavelength to Colors

Wavelength to Colors

I did a short experiment several years back on Wavelengths and colors. I was working for Beckman Coulter on their latest Flow Cytometer, which involved working with dozens of lasers of different wavelengths. These lasers would be reflected and filtered to obtain different wavelengths and this needed to be displayed to the user in an intuitive UI. Back then, I wrote a little Windows application that would convert the wavelength to RGB colors, for my reference. I figured I could take the same approach and make it a Silverlight application and here it is… As you can see from the code I am using a PolyBezierSegment and modifying the location of the three points of each wave when the trackbar slider is moved. The corresponding wavelength in nano meters corresponds to the actual color of the light wavelength. The watermarked curves mark the margins of the visible spectrum. Go ahead and move the slider below: mainpage.xaml.cs using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Windows; using System.Windows.Controls; using...

Read More

Posted by on 27th September, 2009

Another Clock experiment

Another Clock experiment

I seem to be unable to break free form any projects that are somehow related to clocks or watches. This time I saw a YouTube movie about an unique clock with a very creative way of displaying time. It is a design is by Sander Mulder and can be seen here: Continue Time Clock. It allows a single arm that is segmented in three parts, to show the hours, minutes and seconds with each correspondent segment at the same time, and although it may not be very intuitive, it is extremely creative and elegant at the same time. Here is my attempt at re-creating the mechanism of this clock in Silverlight 3.0 … It turned out to be relatively simple, by creating a class for each arm and let the hour arm class contain an instance the minute arm class and the minute arm class an instance of the second arm class. This way I could just spin them around their RenderTransformOrigin and they would maintain their relative position...

Read More

Posted by on 6th July, 2009

Vacheron Constantin watch experiment..

Vacheron Constantin watch experiment..

This morning I ran across an article about some watches and there is one that caught my attention. It is a Vacheron Constantin Mercator America and it is a beautiful watch. A bit pricey, but if I ever have $47.500 that I don’t need, maybe I’ll get it some day. The hands of the clock represent what are called nautical dividers and are used by navigational officers to quickly determine distance and range on a maritime charts. I have used these plenty, so perhaps that explains the fascination with this watch. You can buy the watch here and find some exquisite information here. In the meantime, I could only think that the display was quite interesting, and having a maritime background, I loved the concept and originality of its design. I have added a “seconds” counter that moves along the bottom edge of the numbers as well. This was a relatively easy experiment as one can tell by the code… armhour.xaml.cs using System; using System.Collections.Generic; using System.Linq; using System.Net;...

Read More

Posted by on 15th March, 2009

Silverlight 2.0 Moonlander game…

Silverlight 2.0 Moonlander game…

It has been a while since I have posted an experiment and mostly because I have been quite busy and maybe the little project I started was a bit more than just an afternoon (as is usually the case…). I really wanted to write a simple 1980’s type of game, such as asteroids, but someone had already done that in silverlight. So I figured I’d try something else, like the 1980’s Moonlander arcade game. I know that writing a game is much more than just an experiment as it has much more to handle than just a single purpose. I have several times considered scrapping it altogether and starting on something else, but after many weeks on the back burner, I figured, I’d just get it over with and finish it. I have to say that the hardest part here was the collision detection and the gravity calculation. I was shockingly surprised that Silverlight 2.0 does not have an obvious built-in HitTest or collision detection method for individual objects...

Read More

Posted by on 25th December, 2008

Another Silverlight clock experiment…

Another Silverlight clock experiment…

I started working on enhancing the previous Silverlight 2.0 clock I had made, en then I saw a Flash implementation of another creative approach of a clock and wondered if I could do that in Silverlight. Needless to say, I started working on it immediately and below is the result. This is another experiment that I thought I could do in just a few hours and it ended up taking me a bit more. Mostly because of the uneven conversions between the units and the different sizes between the boxes. Anyways, in a nutshell here is my approach: I have a very simple XAML file with only defining seven empty canvasses as placeholders, organized from top to bottom by a StackPanel. I will create and populate every single object dynamically and on the fly: I have a single method (CreateBasicCancas) that generates all the textBoxes for each individual gear. Then I have a single Storyboard that iterates every millisecond and that storyboard calls one single method (MoveGears) for all...

Read More

Posted by on 14th December, 2008

Random animated clock

Random animated clock

I have done some code samples in Silverlight 2.0, but nothing worth sharing. So over the weekend, I saw an pretty impressive clock written in Flash and had to try to emulate some of its functionality in Silverlight 2.0. The clock can be seen here and I just loved the creativity, attention to detail and the smooth motion of the digits. For my experiment, I am only trying to (somewhat) reproduce the gyration of the number cluster, based on their location and individual rotation. Eventually, I will have more time to do it with all the digits and get it as smooth as in the Flash clock, with the subtle movements. For now, this is just a quick attempt at recreating the concept and will hopefully do… 🙂 mainpage.xaml.cs using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Shapes; namespace SilverlightRandomClock_Fixed { public partial class Page : UserControl { public Page() { InitializeComponent(); this.animateSeconds.Begin(); } private void...

Read More

Posted by on 14th December, 2008

Simulating snow…

Simulating snow…

With the winter not bringing us any snow so far, I thought I’d make some snow myself… I had seen some implementations of “snowmaking” here and there in Silverlight 2.0, but found that some implementations were too complex for just a Sunday morning project. So I figured I’d try it myself… It is a very simple concept: generate programmatically 200 Image objects, populate them and then have one Storyboard, that fires every milliseconds, go through each one of the flakes, and move them a few pixels further down. Of course, if this were a formal project, I would have made each flake their own class etc., just like Mike did in his example, but this experiment needed to be something simple, quick and still look somewhat realistic. As you can see from the amount of code, which is relatively little, a lot more can be done here. Maybe rotate the individual flakes, take them from randomly different images, so they are not all the same and speed up some...

Read More

Posted by on 20th November, 2008

SharePoint and InfoPath Data Extraction…

SharePoint and InfoPath Data Extraction…

I have worked over the last few years much with business process automation and especially with SharePoint. Here is a somewhat straightforward solution/approach to automate a much used, but manual process in SharePoint. Let’s say you have a document library that users upload documents to. Unless you subscribe to the library and want to be notified, not much really happens when the document lands in the library. So, what if you could have SharePoint take action immediately and initiate, let’s say a Workflow, or simply store the values somewhere else, or email a user with the details…or anything else that you want? And not just with the fact that a document was uploaded (that is already built-in), but, even better, with data from the actual document… Let me walk you through the scenario: we start out with one of the sample InfoPath forms: Asset Tracking and we publish a Form Library based off this InfoPath form to SharePoint. We end up with an empty Form Library as shown below....

Read More