Sunday, December 26, 2010

Mayan calendar

I made the calendar much more readable by adding text labels around the rings like so:

I've just been cleaning up the code and found a couple of errors that have been corrected. You can find the code for the above here.

--Original post below-----------------------

I have been thinking about setting up a "year clock" using multiple rings showing progress in the year, month, day, hour, and minute. I had come up with some designs like so:

In this case the largest circle is the year and the dot on the circle is where we are in the year. The next largest circle is the month and the dot where we are in the month and so on. I had set it up so that everything moved in increments of 1 second. The right side shows what the set up would look like on midnight of December 31st. The nice thing about this clock is that it will never look the same twice in a year. However, it isn't exactly easy to read :)

Next I tried this:

Which uses similar mechanics as the clock above, but as you can see the rings are marked with information. Each circle rotated so that the current date/time was at the top of the ring. Unfortunately this clock proved to be extremely cpu intensive (it was actually pushing my cpu to 100%). I reoriented the circles to this:

But there was no was this script was going to be viable. But I liked the look of the above, with the rings within rings.

Then later I had the idea to try something else and this is what I came up with:

This is when things started looking very Mayan :)
In the above calendar clock, year is the innermost circle and instead of having the circles move I had indicators move around the circles. I also went on to add some system info indicators like so:

The code for the above is here.

Sector11 has also made some cool looking additions to the calendar part. You can see that here. I have a nice Mayan symbol dingbat font that may well be used in conjunction with my circlewriting script to add some glyphs to the calendar also.
I posted a perspective bar set up some time ago, and thought I would revisit a 3D approach. This is what I ended up with.

The bar rises and falls in relation to whatever conky output you feed it. The script can be found here.

It took a crash refresher course in basic trigonometry to get everything working and I can't guarantee that if you try the script it will work. The bar looks as I wanted it to, but I was hoping to be able to define simple coordinates and have multiple bars generated that all fitted together.

This didn't work out in this script as I the math I was using wasn't calculating the right perspectives for subsequent bars.
Updates, I have a couple of things that I've been working on recently.

First there is a amalgamated circle generating and circlewriting lua script.
It can do things like this:

And this is a little more complicated (obviously you can get whatever colors you want for rings and text I was just feeling monochrome when I made these.)

The intertwining effect is made by making different bits of the circle at different points in the lua script. In lua the later instances of cairo graphics are drawn above any earlier instances.

The script can be found here on the crunchbang Linux forum (where you can see a more colorful use of the script. It can also generate bars that can be placed and rotated freely.