Skip to content

Commit

Permalink
revisit todos #6 and revise manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
tomtuamnuq committed Mar 29, 2024
1 parent bdb88b3 commit 34feced
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 30 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 11 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
[package]
authors = ["Tom Krüger <[email protected]>"]
description = "An interactive visualization tool for dynamics in chaotic systems."
homepage = "https://tomtuamnuq.github.io/rusty-chaos-craftor/"
keywords = ["chaotic-dynamical-systems", "particles", "fractals", "complex-numbers", "perplex-numbers"]
categories = ["chaos-theory", "simulation", "mathematics"]
license = "MIT"
repository = "https://github.com/tomtuamnuq/rusty-chaos-craftor"
name = "rusty-chaos-craftor"
version = "1.0.0"
authors = ["Tom Krüger <[email protected]>"]
readme = "README.md"
edition = "2021"
rust-version = "1.76"

Expand Down Expand Up @@ -33,9 +40,9 @@ num-dual = "0.8"

# switch manually between local git and upstream
egui-plotter = { git = "https://github.com/Gip-Gip/egui-plotter.git", branch = "main" }
perplex_num = { git = "https://github.com/tomtuamnuq/perplex_num.git", branch = "main" }
#egui-plotter = { path = "../egui-plotter" }
#perplex_num = { path = "../perplex_num" }
perplex_num = "0.1"
# egui-plotter = { path = "../egui-plotter" }
# perplex_num = { path = "../perplex_num" }

# native:
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
Expand Down
4 changes: 2 additions & 2 deletions assets/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "RustyChaosCraftor PWA",
"short_name": "rusty-chaos-craftor-pwa",
"name": "Rusty-Chaos-Craftor",
"short_name": "Chaos Craftor",
"icons": [
{
"src": "./icon-256.png",
Expand Down
1 change: 1 addition & 0 deletions assets/sw.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// progressive web application cache
var cacheName = 'rusty-chaos-craftor-pwa';
var filesToCache = [
'./',
Expand Down
18 changes: 9 additions & 9 deletions src/chaos/benchmark.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
use std::{
sync::{Arc, Mutex},
thread,
};
// TODO use wasm threads
use super::{
data::{ChaosData, ChaosDataVec, InitialDistributionConfig, ValidStateCheck},
execution::*,
};
use anyhow::Error;
use std::{
sync::{Arc, Mutex},
thread,
};
use web_time::{Duration, Instant};
pub struct ChaosInitSchema {
pub num_samples: usize,
Expand Down Expand Up @@ -138,10 +137,11 @@ fn chaos_benchmark_run(
ChaosDataVec::State4(data) => evaluate_chaos_data(data),
ChaosDataVec::ParticleXY(data) => evaluate_chaos_data(data),
ChaosDataVec::ParticleXYZ(data) => evaluate_chaos_data(data),
ChaosDataVec::FractalComplex(data) => evaluate_chaos_data(data), // TODO specific for fractal - num iterations
ChaosDataVec::FractalDual(data) => evaluate_chaos_data(data), // TODO specific for fractal - num iterations
ChaosDataVec::FractalPerplex(data) => evaluate_chaos_data(data), // TODO specific for fractal - num iterations
ChaosDataVec::FractalQuaternion(data) => evaluate_chaos_data(data), // TODO specific for fractal - num iterations
// TODO evaluate number of iterations for fractals
ChaosDataVec::FractalComplex(data) => evaluate_chaos_data(data),
ChaosDataVec::FractalDual(data) => evaluate_chaos_data(data),
ChaosDataVec::FractalPerplex(data) => evaluate_chaos_data(data),
ChaosDataVec::FractalQuaternion(data) => evaluate_chaos_data(data),
};
Ok(ChaosBenchmarkRun {
runtime: elapsed,
Expand Down
13 changes: 5 additions & 8 deletions src/chaos/data/initial_distribution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,14 +196,11 @@ impl InitialDistributionVariant {
num_points,
rng,
),
InitialDistributionVariant::Exponential(d) => {
// TODO check d
data_gen_from_distribution(
rand_distr::Exp::new(d.lambda.to_owned()).unwrap(),
num_points,
rng,
)
}
InitialDistributionVariant::Exponential(d) => data_gen_from_distribution(
rand_distr::Exp::new(d.lambda.to_owned()).unwrap(),
num_points,
rng,
),
InitialDistributionVariant::LogNormal(d) => data_gen_from_distribution(
rand_distr::LogNormal::new(d.mean.to_owned(), d.std_dev.to_owned()).unwrap(),
num_points,
Expand Down
2 changes: 0 additions & 2 deletions src/chaos/fractal/fractal_conf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,6 @@ impl Default for MandelbrotBiomorphComplex {
}
impl Default for MandelbrotBiomorphDual {
fn default() -> Self {
// TODO Dual
Self {
r: DEFAULT_BIOMORPH_R,
m_re: -0.1,
Expand Down Expand Up @@ -946,7 +945,6 @@ impl Default for JuliaBiomorphComplex {
}
impl Default for JuliaBiomorphDual {
fn default() -> Self {
// TODO Dual
Self {
r: DEFAULT_BIOMORPH_R,
c_re: -0.01,
Expand Down
1 change: 0 additions & 1 deletion src/chaos/fractal/julia.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ impl<E: AlgebraElement> JuliaPicard<E> {
}

impl<E: AlgebraElement> FractalGenerator for JuliaPicard<E> {
// TODO add DOI
type Element = E;
fn is_set_element(&self, fractal: &mut FractalData<Self::Element>) -> bool {
self.escape.check_escape(fractal)
Expand Down
2 changes: 1 addition & 1 deletion src/chaos/functions/discrete_maps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ impl ChaosDescription for Zaslavskii {
}
fn reference(&self) -> &'static str {
"https://wikipedia.org/wiki/Zaslavskii_map"
} // TODO http://www.scholarpedia.org/article/Zaslavsky_map
}
}
impl ChaosFormula for Zaslavskii {
fn formula(&self) -> &[&'static str] {
Expand Down
2 changes: 1 addition & 1 deletion src/gui/plot/plot_colors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub enum SeriesColors {
BlackWhite,
Bone,
Copper,
// TODO DerivedColorMap(Vec<(f64, RGBColor)>),
// DerivedColorMap(Vec<(f64, RGBColor)>) possible as well
#[default]
MandelbrotHSL,
ViridisRGB,
Expand Down

0 comments on commit 34feced

Please sign in to comment.