From fc8ef0f45a51dc51adac504ca8a536a656a99b25 Mon Sep 17 00:00:00 2001 From: lat-murmeldjur Date: Fri, 22 Mar 2024 16:32:41 +0100 Subject: [PATCH] "Auto commit number 28" --- Cargo.toml | 3 -- chronicl.dt | 2 +- featuring.dt | 2 +- ohio.note | 1 + src/anomaly.rs | 127 +++++++++++++++++++++++++++++++++++++++++++------ 5 files changed, 116 insertions(+), 19 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 5abaa93..4912f3c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,10 +10,7 @@ edition = "2021" vulkano = { git = "https://github.com/vulkano-rs/vulkano.git" } winit = { git = "https://github.com/rust-windowing/winit.git" , features = ["rwh_05"] } cgmath = { git = "https://github.com/rustgd/cgmath.git" } -glium = { git = "https://github.com/glium/glium.git" } -png = { git = "https://github.com/image-rs/image-png.git" } rand = { git = "https://github.com/rust-random/rand.git" } -ron = { git = "https://github.com/ron-rs/ron" } serde = { git = "https://github.com/serde-rs/serde.git" , features = ["derive"] } vulkano-shaders = { git = "https://github.com/vulkano-rs/vulkano.git" } vulkano-util = { git = "https://github.com/vulkano-rs/vulkano.git" } diff --git a/chronicl.dt b/chronicl.dt index a5c750f..368f89c 100644 --- a/chronicl.dt +++ b/chronicl.dt @@ -1 +1 @@ -27 \ No newline at end of file +28 \ No newline at end of file diff --git a/featuring.dt b/featuring.dt index a5c750f..368f89c 100644 --- a/featuring.dt +++ b/featuring.dt @@ -1 +1 @@ -27 \ No newline at end of file +28 \ No newline at end of file diff --git a/ohio.note b/ohio.note index e18d6fd..606dd8f 100644 --- a/ohio.note +++ b/ohio.note @@ -26,3 +26,4 @@ Year::2024::|::Month::03::|::Day::18::|::Hour::13::|::Minute::57::|::Second::56: Year::2024::|::Month::03::|::Day::19::|::Hour::19::|::Minute::40::|::Second::53:: Year::2024::|::Month::03::|::Day::20::|::Hour::17::|::Minute::16::|::Second::54:: Year::2024::|::Month::03::|::Day::21::|::Hour::14::|::Minute::51::|::Second::35:: +Year::2024::|::Month::03::|::Day::22::|::Hour::16::|::Minute::32::|::Second::41:: diff --git a/src/anomaly.rs b/src/anomaly.rs index 958218c..722ab50 100644 --- a/src/anomaly.rs +++ b/src/anomaly.rs @@ -1,3 +1,6 @@ +// experimental generic composite reductive approximation outline +use std::thread; + pub struct Anomaly { pub Anomaly: Vec, pub Component: Vec, @@ -16,17 +19,22 @@ pub struct Component { } pub struct Property { - pub Name: String, + pub Name: f64, pub Value: f64, } pub struct Force { pub Force: Vec, - pub Relative: Vec, pub Range: Vec, pub Domain: Vec, } +static EC: f64 = 313.0; +static Sp: f64 = 591.0; +static Ms: f64 = 343.0; +static Cr: f64 = 0.10; +static QMs: [f64; 6] = [2.2, 4.7, 1.28, 96.0, 173.1, 4.18]; + pub fn particle(position: [f32; 3], properties: Vec) -> Anomaly { let mut anom = Anomaly { Anomaly: vec![], @@ -38,49 +46,140 @@ pub fn particle(position: [f32; 3], properties: Vec) -> Anomaly { }], Property: properties, }], - Force: force().Force, + Force: force_base().Force, }; anom } +pub fn e(position: [f32; 3], clock: bool) { + let sp = if clock { 0.5 } else { -0.5 }; + particle( + position, + vec![ + Property { + Name: Sp, + Value: sp, + }, + Property { + Name: EC, + Value: -1.0, + }, + Property { + Name: Ms, + Value: 0.511, + }, + ], + ); +} + +pub fn q(position: [f32; 3], clock: bool, charge: bool, color: u8, flavor: u8) { + let sp = if clock { 0.5 } else { -0.5 }; + let ch = if charge { 2.0 / 3.0 } else { -1.0 / 3.0 }; + + particle( + position, + vec![ + Property { + Name: Sp, + Value: sp, + }, + Property { + Name: EC, + Value: ch, + }, + Property { + Name: Ms, + Value: QMs[(flavor % 6) as usize], + }, + Property { + Name: Cr, + Value: (color % 6) as f64, + }, + ], + ); +} + pub fn particular(coordinates: Vec<[f32; 3]>) -> Vec<[f32; 3]> { return coordinates; } -pub fn force() -> Force { +pub fn force_base() -> Force { return Force { Force: vec![ // S Force { Force: vec![], - Relative: vec![1.0], - Range: vec![], - Domain: vec![], + Range: vec![1e-15], + Domain: vec![Component { + Component: vec![], + Composition: vec![], + Property: vec![Property { + Name: Cr, + Value: 1.0, + }], + }], }, // EM Force { Force: vec![], - Relative: vec![1.0 / 137.0], Range: vec![f64::MAX], - Domain: vec![], + Domain: vec![Component { + Component: vec![], + Composition: vec![], + Property: vec![Property { + Name: EC, + Value: 1.0 / 137.0, + }], + }], }, // W Force { - Force: vec![], - Relative: vec![1e-6], + Force: vec![ + // N + Force { + Force: vec![], + Range: vec![1e-18], + Domain: vec![Component { + Component: vec![], + Composition: vec![], + Property: vec![Property { + Name: Ms, + Value: 1e-13, + }], + }], + }, + // C + Force { + Force: vec![], + Range: vec![1e-18], + Domain: vec![Component { + Component: vec![], + Composition: vec![], + Property: vec![Property { + Name: Sp, + Value: 1e-13, + }], + }], + }, + ], Range: vec![], Domain: vec![], }, // G Force { Force: vec![], - Relative: vec![1e-41], Range: vec![f64::MAX], - Domain: vec![], + Domain: vec![Component { + Component: vec![], + Composition: vec![], + Property: vec![Property { + Name: Ms, + Value: 1e-41, + }], + }], }, ], - Relative: vec![], Range: vec![], Domain: vec![], };