out folder auto
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
use image::{ImageBuffer, Rgb, RgbImage};
|
||||
use std::f64::consts::PI;
|
||||
use std::fs;
|
||||
|
||||
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()
|
||||
@ -30,6 +31,8 @@ fn main() {
|
||||
let max_n = 6;
|
||||
let max_m = 6;
|
||||
|
||||
fs::create_dir_all("out").expect("Erreur");
|
||||
|
||||
for n in 1..max_n {
|
||||
for m in 1..max_m {
|
||||
generate_png(n, m, width, height);
|
||||
|
||||
Reference in New Issue
Block a user