JSFiddle - React, Tailwind, and code Playground
HTML
<canvas id="mycanvas"></canvas>
JavaScript
var seed = 25; //Escolha um valor numérico positivo e inteiro qualquer.
var canvas = document.getElementById('mycanvas');
if (canvas.getContext){
var ctx = canvas.getContext('2d');
ctx.beginPath();
ctx.moveTo(0,100);
for (var i = 0; i < 100; i++) {
//Vamos usar a fórmula do Rogério Barreto
seed = ((seed * 31337) + 123) % 100;
ctx.lineTo(i * 10, 100 + ((seed - 50) / 5));
}
ctx.lineTo(1000, 200);
ctx.lineTo(0, 200);
ctx.fillStyle="green";
ctx.fill();
}