Skip to content

Commit

Permalink
Reverse Probability Discrete Map and Transcendental Fractal Generator (
Browse files Browse the repository at this point in the history
…#9)

* change probability to transcendental fractal generator

* add ReverseProbability DiscreteMap variant

* fine adjustements defaults and info hover
  • Loading branch information
tomtuamnuq authored Apr 2, 2024
1 parent b811980 commit 3bb0c36
Show file tree
Hide file tree
Showing 13 changed files with 335 additions and 143 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

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

5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Special thanks to the following Rust crates that made this project possible:
I would like to express my gratitude to the following authors and sources for providing the mathematical foundations of the chaotic discrete maps, systems of ordinary differential equations, and fractal set generators that power this project. Their work has been instrumental in creating this interactive exploration tool for chaos theory. All references can also be found in the **Info** tooltips of the GUI.

### Discrete Maps
- Paul Bourke for the **De Jong Ring** and **Clifford** attractors, which are two-dimensional chaotic maps that produce complex and beautiful patterns. [Website](https://paulbourke.net/fractals/)
- Paul Bourke for the **Reverse Probability**, **De Jong Ring** and **Clifford** attractors, which are two-dimensional chaotic maps that produce complex and beautiful patterns. [Website](https://paulbourke.net/fractals/)
- Shah et al. for a **three-dimensional** chaotic map that has applications in digital audio security. [Publication](https://doi.org/10.1007/s11042-021-10697-3)
- Huang et al. for a *three-dimensional discrete **memristive** chaotic system that has infinite wide parameter range and coexisting attractors*. [Publication](http://dx.doi.org/10.21203/rs.3.rs-1109068/v1)
- Hamadneh et al. for a **four-dimensional** *fractional chaotic map with constant and variable order*. [Publication](https://doi.org/10.3390/math11204332)
Expand All @@ -106,9 +106,10 @@ I would like to express my gratitude to the following authors and sources for pr
- Wang, Feng and Chen for a new **four-dimensional** chaotic system. [Publication](https://doi.org/10.3389/fphy.2022.906138)

### Fractal Configurations and Algorithms
- Paul Bourke for the probability, sinus, sinh, and zubieta Julia set generators, which are complex functions that produce fractal patterns based on the initial conditions. [Website](https://paulbourke.net/fractals/)
- Paul Bourke for the sinus, sinh, and zubieta Julia set generators, which are complex functions that produce fractal patterns based on the initial conditions. [Website](https://paulbourke.net/fractals/)
- Gdawiec, Fariello and Santos for Algorithm 1 in *On the **quaternion** Julia sets via Picard–Mann iteration*. [Paper](https://doi.org/10.1007/s11071-023-08785-0)
- Kumari et al. for Algorithm 3 in *A novel approach to generate Mandelbrot sets, Julia sets and **biomorphs** via viscosity approximation method*. [Paper](https://doi.org/10.1016/j.chaos.2022.112540)
- Bankers et al. for their work *Julia and Mandelbrot Sets for Dynamics over the Hyperbolic Numbers*, which motivated me to include **Perplex** numbers in this project. Perplex (also known as hyperbolic) numbers are a variation of complex numbers that encode geometric properties of the Minkowski space. [Paper](https://doi.org/10.3390/fractalfract3010006)
- Prajapati et al. for *A Brief Study on Julia Sets in the Dynamics of Entire Transcendental Function Using Mann Iterative Scheme*, which inspired me to include a fractal generator with an **exponential** term.

See my crate [perplex_num](https://github.com/tomtuamnuq/perplex_num) for additional information.
19 changes: 10 additions & 9 deletions src/chaos/execution/controller_exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ macro_rules! try_init_from_chaos_data {
Gingerbreadman,
KaplanYorke,
Rulkov,
Zaslavskii
Zaslavskii,
ReverseProbability
],
[Brusselator, VanDerPol, QuadrupTwoOrbit]
);
Expand Down Expand Up @@ -87,14 +88,14 @@ macro_rules! try_init_from_chaos_data {
initial_chaos_data,
[
MandelbrotPowerComplex,
MandelbrotProbabilityComplex,
MandelbrotTranscendentalComplex,
MandelbrotSinusComplex,
MandelbrotSinhComplex,
MandelbrotZubietaComplex,
MandelbrotPicardComplex,
MandelbrotBiomorphComplex,
JuliaPowerComplex,
JuliaProbabilityComplex,
JuliaTranscendentalComplex,
JuliaSinusComplex,
JuliaSinhComplex,
JuliaZubietaComplex,
Expand All @@ -111,14 +112,14 @@ macro_rules! try_init_from_chaos_data {
initial_chaos_data,
[
MandelbrotPowerDual,
MandelbrotProbabilityDual,
MandelbrotTranscendentalDual,
MandelbrotSinusDual,
MandelbrotSinhDual,
MandelbrotZubietaDual,
MandelbrotPicardDual,
MandelbrotBiomorphDual,
JuliaPowerDual,
JuliaProbabilityDual,
JuliaTranscendentalDual,
JuliaSinusDual,
JuliaSinhDual,
JuliaZubietaDual,
Expand All @@ -135,14 +136,14 @@ macro_rules! try_init_from_chaos_data {
initial_chaos_data,
[
MandelbrotPowerPerplex,
MandelbrotProbabilityPerplex,
MandelbrotTranscendentalPerplex,
MandelbrotSinusPerplex,
MandelbrotSinhPerplex,
MandelbrotZubietaPerplex,
MandelbrotPicardPerplex,
MandelbrotBiomorphPerplex,
JuliaPowerPerplex,
JuliaProbabilityPerplex,
JuliaTranscendentalPerplex,
JuliaSinusPerplex,
JuliaSinhPerplex,
JuliaZubietaPerplex,
Expand All @@ -159,14 +160,14 @@ macro_rules! try_init_from_chaos_data {
initial_chaos_data,
[
MandelbrotPowerQuaternion,
MandelbrotProbabilityQuaternion,
MandelbrotTranscendentalQuaternion,
MandelbrotSinusQuaternion,
MandelbrotSinhQuaternion,
MandelbrotZubietaQuaternion,
MandelbrotPicardQuaternion,
MandelbrotBiomorphQuaternion,
JuliaPowerQuaternion,
JuliaProbabilityQuaternion,
JuliaTranscendentalQuaternion,
JuliaSinusQuaternion,
JuliaSinhQuaternion,
JuliaZubietaQuaternion,
Expand Down
3 changes: 2 additions & 1 deletion src/chaos/execution/executor_variants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,12 @@ create_and_implement_executor_variants! {
KaplanYorke 2,
Rulkov 2,
Zaslavskii 2,
ReverseProbability 2,
Shah 3,
Memristive 3,
Sfsimm 4
]
[Power, Probability, Sinus, Sinh, Zubieta, Picard, Biomorph]
[Power, Transcendental, Sinus, Sinh, Zubieta, Picard, Biomorph]
[
Brusselator 2,
VanDerPol 2,
Expand Down
41 changes: 21 additions & 20 deletions src/chaos/fractal/descriptions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ impl PrettyPrintElem for Quaternion {
macro_rules! implement_description {
($($elem:ident ),*)=> {
const LABEL_ITER_ESCAPE_COLOR: &str = "Iteration criteria: num iter < 255";
const LABEL_ITER_ESCAPE_TRANS: &str = "Iteration criteria: num iter < 50";
const LABEL_ITER_ESCAPE_PICARD: &str = "Iteration criteria: num iter < 30";
const LABEL_ITER_ESCAPE_BIOMORPH: &str = "Iteration criteria: num iter < 10";
paste!{
Expand Down Expand Up @@ -76,45 +77,45 @@ macro_rules! implement_description {
}
}

impl ChaosDescription for [<MandelbrotProbability $elem>] {
impl ChaosDescription for [<MandelbrotTranscendental $elem>] {
fn description(&self) -> String{
format!("Adjusted probability reverse Julia adaptation for a Mandelbrot set. Inspired by Roger Bagula and Paul Bourke. Chosen is n={} and a={:.2}", self.power_n(), self.par_a())
format!("Entire transcendental function adaptation for a Mandelbrot set. Chosen is n={} a={:.2} and b={:.2} ", self.power_n(), self.par_a(), self.par_b())
}
fn reference(&self) -> &'static str{
"https://paulbourke.net/fractals/reversejulia/"
"https://www.mdpi.com/2504-3110/6/7/397"
}
}
impl ChaosFormula for [<MandelbrotProbability $elem>]{
impl ChaosFormula for [<MandelbrotTranscendental $elem>]{
fn formula(&self) -> &[&'static str]{
&[
"p= Uniform(0, 1)",
"s= 1 if p > a else -1",
"z re= s (||z - z0||)^(1/n) cos(arg(z)/2)",
"z im= s (||z - z0||)^(1/n) sin(arg(z)/2)",
"q= a exp(z^n) + b z + z0",
"z= α q + (1 - α) z",
"z0 from initial distribution",
"Bounding criteria: |z| < r",
LABEL_ITER_ESCAPE_COLOR
"R_1= max(|z0|, (|b| + 2 / α)^(1 / (n - 1) )",
"R_2= (|a| Re(z0^n))^(1 / n)",
"Bounding criteria: |z| < R_1 & R_2 < |z|",
LABEL_ITER_ESCAPE_TRANS
]
}
}
impl ChaosDescription for [<JuliaProbability $elem>] {
impl ChaosDescription for [<JuliaTranscendental $elem>] {
fn description(&self) -> String{
format!("Adjusted probability reverse Julia by Roger Bagula and Paul Bourke. Chosen is n={}, a={:.2} and c={}", self.power_n(), self.par_a(), self.c().pretty_print())
format!("Transcendental function using mann iterative scheme. See the paper 'A Brief Study on Julia Sets in the Dynamics of Entire Transcendental Function Using Mann Iterative Scheme' by Prajapati et al. Chosen is n={}, a={:.2} b={:.2} and c={}", self.power_n(), self.par_a(), self.par_b(), self.c().pretty_print())
}
fn reference(&self) -> &'static str{
"https://paulbourke.net/fractals/reversejulia/"
"https://www.mdpi.com/2504-3110/6/7/397"
}
}
impl ChaosFormula for [<JuliaProbability $elem>]{
impl ChaosFormula for [<JuliaTranscendental $elem>]{
fn formula(&self) -> &[&'static str]{
&[
"p= Uniform(0, 1)",
"s= 1 if p > a else -1",
"z re= s (||z - c||)^(1/n) cos(arg(z)/2)",
"z im= s (||z - c||)^(1/n) sin(arg(z)/2)",
"q= a exp(z^n) + b z + c",
"z= α q + (1 - α) z",
"z0 from initial distribution",
"Bounding criteria: |z| < r",
LABEL_ITER_ESCAPE_COLOR
"R_1= max(|c|, (|b| + 2 / α)^(1 / (n - 1) )",
"R_2= (|a| Re(z0^n))^(1 / n)",
"Bounding criteria: |z| < R_1 & R_2 < |z|",
LABEL_ITER_ESCAPE_TRANS
]
}
}
Expand Down
Loading

0 comments on commit 3bb0c36

Please sign in to comment.