This is an example of a counter for the diameter (d), area (a), radius (r) and circumference (c) of a circle. Use the mouse Lengths are scratch pixels.
Code 100% from me 100% pen Pi from Wikipedia