Arcs, Moons and Pies
Enhanced Draw files from Basic
by John Banks

This program extends the work of Gordon Gilmore (RISC user 5:5, 5:6, 5:8, 6:2, and 6:3) and Michael Janse (6:7) by adding more facilities to the CDraw Library. Double clicking on this application creates three files in the the private "Files" directory within the application, which can be viewed or printed by loading them into the Draw application supplied with your computer, or one of its extensions.

The new procedures allow you to

- draw circular arcs, sectors and segments, filled or unfilled for a given starting point, centre, radius and "sense" of plotting (clockwise or anticlockwise).

 - join two given points by a circular arc of specified radius and sense

- group objects together in a draw file

-plot a text string so that it ends or is centred at the given position, as well begins there as it did before

There are also various enhancements to the exsting routines.

The file "Test" in the application's "files" subdirectory shows these routines in action.

The file "Piechart" applies them to the problem of producing in Draw a pie graph from arbitrary data. A procedure to do this automatically from data supplied as a simple text-file has been provided.

The application also contains a procedure for producing an image of the moon at various ages. The file "Moons" is the result of using this to produce an image of the moon as seen on on every day of the month.

See the article in this month's RISC User for more details.
    

