Chaos Maps Random Number Sequences Pseudorandom Numbers or PRN Histogram of some popular chaos sequences 1 d logic map 2 d logic map Chen s sequence Chebyshev map Lorenz s sequence and Arnold s cat map DOCTYPE html html lang en head meta charset UTF 8 meta name viewport content width device width initial scale 1 0 title Map Histograms title script src https cdn plot ly plotly latest min js script head body div id histogram1D div div id histogram2D div div id histogramChen div div id histogramChebyshev div div id histogramLorenz div div id histogramArnold div script Function to generate 1D logistic map sequence function logisticMap1D u x0 iterations const result let x x0 for let i 0 i iterations i x u x 1 x result push x return result Function to generate 2D logistic map sequence function logisticMap2D u v x0 y0 iterations const result let x x0 let y y0 for let i 0 i iterations i const newX u x 1 x v y 1 y const newY x result push newX result push newY x newX y newY return result Function to generate Chen s sequence function chensSequence a b x0 y0 iterations const result let x x0 let y y0 for let i 0 i iterations i const newX Math sin a y Math cos b x const newY x result push newX result push newY x newX y newY return result Function to generate Chebyshev map sequence function chebyshevMap a x0 iterations const result let x x0 for let i 0 i iterations i const newX 1 a x x result push newX x newX return result Function to generate Lorenz s sequence function lorenzSequence sigma rho beta x0 y0 z0 iterations dt const result let x x0 let y y0 let z z0 for let i 0 i iterations i const newX x dt sigma y x const newY y dt x rho z y const newZ z dt x y beta z result push newX result push newY result push newZ x newX y newY z newZ return result Function to generate Arnold s cat map sequence function arnoldsCatMap x0 y0 iterations const result let x x0 let y y0 for let i 0 i iterations i const newX x y 1 const newY x 2 y 1 result push newX result push newY x newX y newY return result Parameters const iterations 1000 Generate sequences const sequence1D logisticMap1D 3 8 Math random iterations const sequence2D logisticMap2D 3 8 0 5 Math random Math random iterations const sequenceChen chensSequence 2 4 Math random Math random iterations const sequenceChebyshev chebyshevMap 1 51 Math random iterations const sequenceLorenz lorenzSequence 10 28 8 3 Math random Math random Math random iterations 0 01 const sequenceArnold arnoldsCatMap Math random Math random iterations Create histograms const trace1D x sequence1D type histogram name 1D Logistic Map const trace2D x sequence2D type histogram name 2D Logistic Map const traceChen x sequenceChen type histogram name Chen s Sequence const traceChebyshev x sequenceChebyshev type histogram name Chebyshev Map const traceLorenz x sequenceLorenz type histogram name Lorenz s Sequence const traceArnold x sequenceArnold type histogram name Arnold s Cat Map Layout const layout1D title Histogram for 1D Logistic Map const layout2D title Histogram for 2D Logistic Map const layoutChen title Histogram for Chen s Sequence const layoutChebyshev title Histogram for Chebyshev Map const layoutLorenz title Histogram for Lorenz s Sequence const layoutArnold title Histogram for Arnold s Cat Map Plot histograms Plotly newPlot histogram1D trace1D layout1D Plotly newPlot histogram2D trace2D layout2D Plotly newPlot histogramChen traceChen layoutChen Plotly newPlot histogramChebyshev traceChebyshev layoutChebyshev Plotly newPlot histogramLorenz traceLorenz layoutLorenz Plotly newPlot histogramArnold traceArnold layoutArnold script body html
z newZ return result Function to generate Arnold s cat map sequence function arnoldsCatMap x0 y0 iterations const result let x x0 let y y0 for let i 0 i iterations i const newX x y 1 const newY x 2 y 1 result push newX result push newY x newX y newY return result Parameters const iterations 1000 Generate sequences const sequence1D logisticMap1D 3 8 Math random iterations const sequence2D logisticMap2D 3 8 0 5 Math random Math random iterations const sequenceChen chensSequence 2 4 Math random Math random iterations const sequenceChebyshev chebyshevMap 1 51 Math random iterations const sequenceLorenz lorenzSequence 10 28 8 3 Math random Math random Math random iterations 0 01 const sequenceArnold arnoldsCatMap Math random Math random iterations Create histograms const trace1D x sequence1D type histogram name 1D Logistic Map const trace2D x sequence2D type histogram name 2D Logistic Map const traceChen x sequenceChen type histogram name Chen s Sequence const traceChebyshev x sequenceChebyshev type histogram name Chebyshev Map const traceLorenz x sequenceLorenz type histogram name Lorenz s Sequence const traceArnold x sequenceArnold type histogram name Arnold s Cat Map Layout const layout1D title Histogram for 1D Logistic Map const layout2D title Histogram for 2D Logistic Map const layoutChen title Histogram for Chen s Sequence const layoutChebyshev title Histogram for Chebyshev Map const layoutLorenz title Histogram for Lorenz s Sequence const layoutArnold title Histogram for Arnold s Cat Map Plot histograms Plotly newPlot histogram1D trace1D layout1D Plotly newPlot histogram2D trace2D layout2D Plotly newPlot histogramChen traceChen layoutChen Plotly newPlot histogramChebyshev traceChebyshev layoutChebyshev Plotly newPlot histogramLorenz traceLorenz layoutLorenz Plotly newPlot histogramArnold traceArnold layoutArnold script body html