August 10, 2008 will

Charting my progress

I spent another afternoon working on my pie chart project. I'm using PyCairo to render labels over the chart render. The tricky part was finding the position at the center of each pie segment to render the label over. There's no way of retrieving that information from Povray, so I had to do the math myself and calculate the coordinates manually. Fortunately I had a 3D math module that I was intimately familiar with, having written it just last year (its always gratifying to re-use code for a new purpose)!

I won't bore you with the gory details. Suffice to say that I generated a pretty animation so I could confirm that the label position code was working correctly. I'm not going to be generating videos with the finished product, this was just a diversion. The segments and labels don't mean anything, it's all just made up! Enjoy...

Use Markdown for formatting
*Italic* **Bold** `inline code` Links to [Google]( > This is a quote > ```python import this ```
your comment will be previewed here
Bill Mill

Very good looking! strong work.

Adam Faulconbridge

Out of interest, why not render the labels in Povray rather than adding them afterwards? Would probably look prettier...