Biorhythm Calculator

Post Reply
MarkTheStrange
Posts: 20
Joined: Sat Nov 26, 2022 6:24 pm

Biorhythm Calculator

Post by MarkTheStrange »

This seems like a suitably retro application for our new retro computer. Written in Prog8 so the graphing is reasonably speedy. (If you aren't familiar with Biorhythms, you can read about the insanity on Wikipedia.)

The Prog8 source code includes a general-purpose date manipulation library, which stores the date as a 16-bit integer counting days from the turn of the millennium, giving a range from 1911-04-15 to 2090-09-17. It also includes some TUI utilities, including the date-picker widget seen below, which only works within the years completely contained in that range (1912-2089).

Image

The target date for the plot is chosen the same way, but defaults to the current date according to the X16's on-board real-time clock.

Image

Once the chart is drawn you can scroll to different dates with the cursor keys, go back to the datepicker to jump around, or go all the way back and pick a new person/birthdate to calculate for.

Try It Now!

#R47
Attachments
biorhythms.prg
(8.32 KiB) Downloaded 120 times
biorhythms.zip
(13.45 KiB) Downloaded 98 times
Post Reply