Showing posts with label pupils are cavities caused by eye candy. Show all posts
Showing posts with label pupils are cavities caused by eye candy. Show all posts

Friday, 5 September 2008

Physics + Programming = Pretty

Whilst looking for a better-than-mine Python implementation of attractive-and-repulsive-based-on-the-inverse-square-law particle simulation I came across this, which is basically a really simple model of gravity. You tell it how many balls you want it to start with, which are then placed at random points on the screen with zero momentum and a mass of 4. Then the simulation starts, running one time step of the simulation and redrawing the screen, then repeating this indefinitely. Particles which collide coalesce into a single particle with the combined mass and momentum of the original. This results in one of three things happening, either all of the masses coalesce into a big, stationary ball (since the net momentum is zero, due to the law of conservation of momentum), two or more masses form a somewhat stable orbit around each other, or one or masses hit the edge of the window during the simulation and 'reflect' (the vector of their velocity perpendicular to the edge is reversed) which breaks the physical simulation by violating conservation of momentum. After this third scenario all hell can break loose, usually resulting in everything coalescing into a huge ball, moving with momentum twice the magnitude of that which was flipped by hitting the wall, and opposite in direction.

Anyway, I looked through the short source file and had a bit of a play. Eventually I gave particles a colour which changes subtley every time they are drawn. I also disabled the old-frame-removing screen fill, allowing each frame of the animation to build upon the previous and create a trail. A little simple colour-cycle logic and I the following patterns appeared to my delight :D




HERE'S THE SOURCE (not properly licensed due to original author. Let's say you can treat is as Public Domain to save complications of licenses)

Monday, 3 September 2007

You don't have to be into violent BDSM to think the GIMP Took Kit is sexy

I came across the Aurora GTK2 engine yesterday, and I have to admit that it is incredibly nice. Seriously. The attention to detail is staggering. It took me a while to find a QT style that I could severely tweak to sort of match it (for Kopete and Amarok, mostly), but after some fiddling I got it looking pretty consistent (although not perfect). I have filed a needs-packaging bug in Launchpad about it, because it really is very nice. Unless there are technical flaws found in it I think it would be great as a default theme (note that the colour scheme is my own. Aurora is actually the first GTK engine I have seen that uses the recently.added recolouring support).

Here's a piccy for you:


Also, some image slicing GUIs have been made, which is cool.