Rich Olson has another great tutorial on how to design and make chainrings using open source software and low cost CNC.
Here is the link to original post with all the tools and scripts needed:
Rich makes a chainring for his bicycle but they have different uses in power transmission. Beside metal they can be also made on a small CNC from other materials like carbon fiber.
Finished carbon plate chainring for a custom bicycle: