Elements along circle arcs - SVG generation with php

This example shows how to create a simple SVG graphic with an arbitrary amount of elements drawn around a circle arc. Radius will adapt to number of elements. Drawing starts to right of the circle (unless you change the start angle) and continues clockwise. If you use more than 20 elements make the radius multiplier very small or else you have to pan the image to see the elements (Alt-mousedrag in SVG viewer)). If you empty input fields results are undetermined (this simple example code, that you can easily fix)

To have a look at the source code, please simply consult the current directory and lock at either *.phps or *.text files with the same name. You also can look at a simpler example: elements-on-circle-with-php.php or a more complex one that reads an XML RSS 0.91 content elements-on-arc-with-simple-xml.php

Number of elements: (less than 3 and more than 30 is a bad idea!.
Center of circle: x = y =
radius multiplier = (multiplier * number of elements * 2 = radius of the circle)
Display angle = (by default a half circle in degrees: 180)
Start angle = (start position of half circle in degrees: 0 to 360)
Show coordinates ?
Show spikes ?

D.K.S. - April 2005