out folder auto

This commit is contained in:
2026-02-14 12:48:29 +01:00
parent a9d4aec2b8
commit c0e663215f

View File

@ -1,5 +1,6 @@
use image::{ImageBuffer, Rgb, RgbImage}; use image::{ImageBuffer, Rgb, RgbImage};
use std::f64::consts::PI; use std::f64::consts::PI;
use std::fs;
fn chladni(x: f64, y: f64, n: f64, m: f64) -> f64 { fn chladni(x: f64, y: f64, n: f64, m: f64) -> f64 {
(n * PI * x).cos() * (m * PI * y).cos() - (m * PI * x).cos() * (n * PI * y).cos() (n * PI * x).cos() * (m * PI * y).cos() - (m * PI * x).cos() * (n * PI * y).cos()
@ -30,6 +31,8 @@ fn main() {
let max_n = 6; let max_n = 6;
let max_m = 6; let max_m = 6;
fs::create_dir_all("out").expect("Erreur");
for n in 1..max_n { for n in 1..max_n {
for m in 1..max_m { for m in 1..max_m {
generate_png(n, m, width, height); generate_png(n, m, width, height);