-
-
Save RandyMcMillan/aad72ddbe002933903a7e99073ec478b to your computer and use it in GitHub Desktop.
cycle_count.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use chrono::{NaiveDate, DateTime, Utc}; | |
| const SEALS: [&str; 20] = [ | |
| "Red Dragon", "White Wind", "Blue Night", "Yellow Seed", | |
| "Red Serpent", "White Worldbridger", "Blue Hand", "Yellow Star", | |
| "Red Moon", "White Dog", "Blue Monkey", "Yellow Human", | |
| "Red Skywalker", "White Wizard", "Blue Eagle", "Yellow Warrior", | |
| "Red Earth", "White Mirror", "Blue Storm", "Yellow Sun" | |
| ]; | |
| struct Underworld { | |
| name: &'static str, | |
| total_days: i64, | |
| } | |
| fn main() { | |
| let now_utc: DateTime<Utc> = Utc::now(); | |
| let today = now_utc.date_naive(); | |
| // ANCHOR: Singularity Point Oct 28, 2011 17:15 UTC | |
| let convergence_date = NaiveDate::from_ymd_opt(2011, 10, 28).expect("Invalid date"); | |
| let days_diff = today.signed_duration_since(convergence_date).num_days(); | |
| // MODULAR KIN (Base 260) | |
| let mut today_kin = (260 + (days_diff % 260) as i32) % 260; | |
| if today_kin <= 0 { today_kin = 260; } | |
| println!("--- 13:20 MATRIX: TOTAL CONVERGENCE ENGINE ---"); | |
| println!("Sync: 2011-10-28 17:15 UTC | Jupiter Opposition"); | |
| println!("Now : {} | Offset: {} days | Kin: {}\n", today, days_diff, today_kin); | |
| // 1. TIGHTENED HARMONIC GRID | |
| print!(" "); | |
| for col in 1..=13 { print!("C{:02} ", col); } | |
| println!("\n{}", "-".repeat(75)); | |
| for row_idx in 0..20usize { | |
| print!("{:>2} | ", row_idx + 1); | |
| for col_idx in 0..13usize { | |
| let kin_id = (col_idx * 20) + row_idx + 1; | |
| let tone = ((kin_id - 1) % 13) + 1; | |
| if kin_id as i32 == today_kin { print!("[{:>2}]", tone); } | |
| else { print!(" {:>2} ", tone); } | |
| } | |
| println!("| {}", SEALS[row_idx]); | |
| } | |
| println!("{}", "-".repeat(75)); | |
| // 2. FRACTAL UNDERWORLDS (With Heaven Stages & Progress) | |
| println!("\n--- The 9 Underworlds: Fractal Wavespell Progress ---"); | |
| let underworlds = [ | |
| Underworld { name: "Cellular", total_days: 16_400_000_000 * 365 }, | |
| Underworld { name: "Mammalian", total_days: 820_000_000 * 365 }, | |
| Underworld { name: "Familial", total_days: 41_000_000 * 365 }, | |
| Underworld { name: "Tribal", total_days: 2_000_000 * 365 }, | |
| Underworld { name: "Regional", total_days: 102_000 * 360 }, | |
| Underworld { name: "National", total_days: 5_125 * 360 }, | |
| Underworld { name: "Planetary", total_days: 256 * 360 }, | |
| Underworld { name: "Galactic", total_days: 4680 }, | |
| Underworld { name: "Universal", total_days: 260 }, | |
| ]; | |
| println!("{:<10} | {:<4} | {:<7} | {:<8} | {:<5} | {:<10}", "Level", "Cyc", "Stage", "Phase", "Prog%", "Day Count"); | |
| println!("{}", "-".repeat(75)); | |
| for uw in underworlds.iter() { | |
| let cycle_num = (days_diff / uw.total_days) + 1; | |
| let day_in = days_diff % uw.total_days; | |
| // 13-Stage Subdivision | |
| let sub_len = uw.total_days as f64 / 13.0; | |
| let heaven = (day_in as f64 / sub_len).floor() as i64 + 1; | |
| let phase = if heaven % 2 != 0 { "LIGHT" } else { "DARK" }; | |
| let progress = (day_in as f64 / uw.total_days as f64) * 100.0; | |
| println!("{:<10} | {:<4} | Stg {:<2} | {:<8} | {:>6.2}% | {:<10}", | |
| uw.name, cycle_num, heaven, phase, progress, day_in); | |
| } | |
| println!("\nSymmetry: {}", if days_diff >= 0 { "Post-Convergence Expansion" } else { "Ante-Convergence Shadow" }); | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=cbf5d599e4bff2bd59fa59749c369d24