welcome: please sign in
CogMaster9000

CogMaster-9000(tm)

Concept

I was thinking it would be neat to make a program to construct 2D animated lattices of gears, so you could create something like this:

http://epi.is-a-geek.net/cosmic-forces-of-mu.jpg

It would allow you to place down static centre-points. Then, lines could be drawn connecting pairs of centre points together to signify which cogs will be touching and turning eachother. From these two bits of data, the cogs can be automatically generated; all that's reqired is cog size and tooth spacing. This simple computation would allow the cogs to be resized on the fly as the centres are dragged around and joined together.

If two cogs overlap because of close connection-lines, the overlaping cogs will be shrunk and the gap between them will be will be automatically filled with a cluster or lattice of smaller cogs which transfer the rotation of one of the original cogs to the other.

Neat fractal-boundaries could be created between centres!

Algorithm

The cog-centres and connections form a connected graph. From this graph, each cog must be given a rotational vector, a size, and a tooth-spacing. To do this, start from the outside of the graph (any node connected to only one other cog) and give it an arbitrary rotation direction. Then, recursively, for each node touching it, compute the distance and tooth-size.

Extra thingies

Could the connector-cogs run in 3D? Spiralling cog filaments (3D along 1D)?