A mobile app that calculates and plots the 3 biorhythm cycles (physical: 23 days, emotional: 28 days, intellectual: 33 days) based on a birth date, with a graph to visualize the curves over 7 days.
Calculation:
- Lived days: instead of "age × 365 + days since birthday + leap days",
the code simply uses `(targetDate - birthDate).Days`. .NET natively supports the
Gregorian calendar (including leap days): the result is accurate and simpler
to maintain than manual counting, for a strictly identical result.
- Position in the cycle: `liveddays % cycleLength` (23, 28, or 33) — this is
exactly the "remainder of the division" described in the method.
- Displayed value (-100% to +100%)**: `sin(2π × position / cycle length) × 100`,
which gives the classic sine wave of the biorhythm (0 = critical day, +100 = peak, -100 = trough) rather than a simple day number.
- Critical day: detected by tolerance (`|value| < 5%`) rather than by strict equality,
because 23 and 33 being odd, the exact crossing of zero never falls exactly on a whole day.