2025-07-18 10:59:41 -07:00
|
|
|
#[path = "common/print.rs"]
|
|
|
|
mod print;
|
2025-06-09 22:21:34 -07:00
|
|
|
|
|
|
|
use dyna3::engine::{Realization, examples::realize_irisawa_hexlet};
|
2024-11-26 00:32:50 +00:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
const SCALED_TOL: f64 = 1.0e-12;
|
2025-06-09 22:21:34 -07:00
|
|
|
let realization_result = realize_irisawa_hexlet(SCALED_TOL);
|
2025-07-18 10:59:41 -07:00
|
|
|
print::title("Irisawa hexlet");
|
|
|
|
print::realization_diagnostics(&realization_result);
|
2025-06-09 22:21:34 -07:00
|
|
|
if let Ok(Realization { config, .. }) = realization_result.result {
|
|
|
|
// print the diameters of the chain spheres
|
2024-11-26 00:32:50 +00:00
|
|
|
println!("\nChain diameters:");
|
|
|
|
println!(" {} sun (given)", 1.0 / config[(3, 3)]);
|
|
|
|
for k in 4..9 {
|
|
|
|
println!(" {} sun", 1.0 / config[(3, k)]);
|
|
|
|
}
|
2025-06-09 22:21:34 -07:00
|
|
|
|
|
|
|
// print the completed Gram matrix
|
2025-07-18 10:59:41 -07:00
|
|
|
print::gram_matrix(&config);
|
2024-11-26 00:32:50 +00:00
|
|
|
}
|
2025-07-18 10:59:41 -07:00
|
|
|
print::loss_history(&realization_result.history);
|
2024-11-26 00:32:50 +00:00
|
|
|
}
|