var script document createElement script script src https cdn plot ly plotly 2 1 0 min js document head appendChild script document body style height 600pt let div0 document createElement div div0 id div0 document body appendChild div0 let div1 document createElement div div1 id div1 document body appendChild div1 perlin noise type random number function smooths var oldrand Math random var newrand Math random var randcount 0 function smoothrand let smoothness 5 randcount if randcount smoothness randcount 0 oldrand newrand newrand Math random let res oldrand newrand oldrand randcount smoothness oldrand res return res var d0 x y mode lines markers var d1 x y mode lines markers for let i 0 i 100 i d0 x push i d0 y push Math random d1 x push i d1 y push smoothrand onload var layout width 500 height 200 plot_bgcolor rgba 0 0 0 0 paper_bgcolor rgba 0 0 0 0 margin l 20 r 10 t 10 b 20 pad 0 Plotly newPlot div0 d0 layout Plotly newPlot div1 d1 layout
rand Math random let res oldrand newrand oldrand randcount smoothness oldrand res return res var d0 x y mode lines markers var d1 x y mode lines markers for let i 0 i 100 i d0 x push i d0 y push Math random d1 x push i d1 y push smoothrand onload var layout width 500 height 200 plot_bgcolor rgba 0 0 0 0 paper_bgcolor rgba 0 0 0 0 margin l 20 r 10 t 10 b 20 pad 0 Plotly newPlot div0 d0 layout Plotly newPlot div1 d1 layout