My Blog: projects, sketches, works in progress, thoughts, and inspiration.

Tagged: clock

Magnetic Field Clock, created in flash with ActionScript 3

Continuing with clocks in ActionScript I created this slightly less abstract clock, loosely inspired by magnetic fields. I’m happy with the way it turned out. I plan to create a screen saver from this as well. If you’re interested it should be available soon. Leave a comment if you have any thoughts or criticisms.

I had a few little battles trying to get everything functioning. Some functions in Actionscript 3 use radians, namely the trigonometry functions, while other more basic functions use degrees. Having to switch frequently between the two tripped me up a few times. Another issue, not directly related to ActionScript, was dealing with the different number sets. Each dial object has an array of text objects. Some begin with zero, so they line up with the array indexes, while others start with one and throw everything off.

Read On »

Read On (Post Continues) »

Orbit Clock

04-03-09

Tagged: , ,

Orbit Clock: Flash clock by Anthony Mattox

I started working with this idea in Processing. I was playing with clocks and fractals and thought it would be funny to stack all the clock hands on each other. I’ve been working a fair amount in ActionScript and decided to rebuild the project in flash to make it a little more portable and improved the design quite a bit. Building clocks is interesting to me as it is a very basic form of data visualization. The data itself seems quite simple, but also practical. In this particular clock each time is represented by a particular shape.

My code is still a little messy, but I will probably post it after a little cleaning up. The whole applet is created with ActionScript 3. I’m still not friends with the flash interface. I have more fun building classes which can create graphics quickly with a few parameters. It’s just more fun that way. This piece will also (hopefully) be a screen saver soon along with a few other little flash projects I’m working on.

Read On »

Read On (Post Continues) »

Using the time functions Processing can be used to create clocks. I enjoy making clocks as a simple exercise in design, interactivity, and simple data visualization. It’s also a horrible pastime as I am always aware of exactly how much time I’ve wasted. This demonstration will walk through creating this applet, showing the implementation of the time functions, the pushMatrix() and popMatrix() functions, modulo function (%), and the basic construction of an array of custom objects.

Like many key programming languages Processing is an Object Oriented Programming Language, sometimes referred to as an OOP. The concept might be a little bit hard to grasp for some, however, it is an invaluable tool which cuts down on script lengths and allows for far more interesting an complex programs without a lot of repetitive code. An “Object” (also called a class) is simply a collection of variables and functions. New instances of objects can be created with different values for all the variables and functions of the object can be easily executed to modify the instance. Although objects often have a graphical component or representation within a program it is important to remember that they are only collections of data and functions which can be manipulated in any way for whatever need. Another advantage is that a program, like this example, can contain arrays of objects, allowing them to all be changed within a “for loop”. The result is an elegant code which is very easy to construct and easier to edit.

Read On »

Read On (Post Continues) »