Mandelbrot
This commit is contained in:
@@ -10,7 +10,7 @@ use fpga_lib::{
|
|||||||
};
|
};
|
||||||
|
|
||||||
type Float = f32;
|
type Float = f32;
|
||||||
pub const ITERATIONS_SHOWN: usize = 100;
|
pub const ITERATIONS_SHOWN: usize = 300;
|
||||||
pub const ASPECT_RATIO: f32 = WIDTH as f32 / HEIGHT as f32;
|
pub const ASPECT_RATIO: f32 = WIDTH as f32 / HEIGHT as f32;
|
||||||
|
|
||||||
#[derive(Clone, Copy)]
|
#[derive(Clone, Copy)]
|
||||||
@@ -42,7 +42,7 @@ panic_handler! {}
|
|||||||
|
|
||||||
#[unsafe(no_mangle)]
|
#[unsafe(no_mangle)]
|
||||||
pub extern "C" fn main() -> ! {
|
pub extern "C" fn main() -> ! {
|
||||||
let mut iterations: usize = 100;
|
let mut iterations: usize = 300;
|
||||||
let color_lut: [Color; ITERATIONS_SHOWN] = {
|
let color_lut: [Color; ITERATIONS_SHOWN] = {
|
||||||
let mut tab = [BLACK; _];
|
let mut tab = [BLACK; _];
|
||||||
(0..(ITERATIONS_SHOWN - 1)).for_each(|i| {
|
(0..(ITERATIONS_SHOWN - 1)).for_each(|i| {
|
||||||
@@ -53,9 +53,9 @@ pub extern "C" fn main() -> ! {
|
|||||||
tab
|
tab
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut zoom_int = 2;
|
let mut zoom_int = 60;
|
||||||
const DELTA: f64 = 0.1;
|
const DELTA: f64 = 0.1;
|
||||||
let mut current_pos = Complex(0.4, 0.);
|
let mut current_pos = Complex(1.002_674_971_219_186_5, 0.296_764_969_447_543_66);
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
let zoom = 1. / zoom_int as f64;
|
let zoom = 1. / zoom_int as f64;
|
||||||
|
|||||||
BIN
bitstreams/mandelbrot-zoom.bit
Normal file
BIN
bitstreams/mandelbrot-zoom.bit
Normal file
Binary file not shown.
Reference in New Issue
Block a user