Continue to smile

<!--Written by Igor Kobzar ( private individual ). June 9, 2025.-->

<!DOCTYPE HTML>

<html lang="en">

<style>

html, body {

background: #b1b7d3;

}

</style>

<body>

<button type="button" style="background: #a1a7c1; color: #f4f9f7; border: none; padding: 16px 48px; font-size: 32px; cursor: pointer;" onclick="alert('Written on local device by Igor Kobzar.')">Info</button>

<button type="button" style="background: #a1a7c3; color: #f4f9f5; border: none; padding: 16px 48px; font-size: 32px; cursor: pointer;" onclick="location.reload()">Back</button>

<button type="button" style="background: #a1a7c5; color: #f4f9f3; border: none; padding: 16px 48px; font-size: 32px; cursor: pointer;" onclick="location.href='q9.html';">Next</button>

<button type="button" style="background: #a1a7c7; color: #f4f9f1; border: none; padding: 16px 48px; font-size: 32px; cursor: pointer;" onclick="location.href='q7.html';">Previous</button>

<script> document.getElementById("date").innerHTML = Date(); </script>

<p style="color:#a1a7c3; background-color:#f4f9f7; font-size:32px;" align="center" id="outnum"></p>

<script>outnum.innerHTML = Date();</script>

<canvas width="2900" height="1900"></canvas>

<script>

let cx = document.querySelector("canvas").getContext("2d");

let r = Number(prompt('Enter positive integer number that determine time of computations, each unit equal 10^4 iterations.'));

let w = Number(prompt('Enter coefficient differ from 0'));

alert("You enter " +  r * 10000 + " iterations and coefficients " + w);

var gradient = cx.createLinearGradient(0, 0, 2900, 1900);

gradient.addColorStop(0, "#a1a7c4");gradient.addColorStop(1, "#212537");

cx.fillStyle = gradient;

cx.fillRect(0,0, 2900, 1900);

var gradient = cx.createLinearGradient(100, 50, 1250, 1600);

gradient.addColorStop(0, "#111724");gradient.addColorStop(1, "#a1a5c7");

cx.fillStyle = gradient;

cx.fillRect(100,50, 1250, 1600);

var gradient =cx.createLinearGradient(1, 3, 1900, 100);

gradient.addColorStop("0", "#232547");

gradient.addColorStop("0.3", "#a1a5c9");

gradient.addColorStop("0.7", "#717392");

gradient.addColorStop("1.0", "#111121");

cx.font="50px Alpine";

cx.strokeStyle = gradient;

cx.strokeText("Absolute values distribution", 400,110);

cx.strokeText("Cartesian phase area", 1900,110);

cx.strokeText(outnum.innerHTML + " Igor Kobzar. With Intel, Microsoft, W3C.", 400,1800);

f = 10000 * r;

a = 1 / 2;

c = 0;

s = 0;

t = 0;

g = 0;

p = 0;

e = 0;

k = 0;

var m = Array(1200);

u = 0;

for(let j = 1; j < 1200; j += 1){

m[j] = 0;

}

for(let i = 1; i < f; i += 1 ){

p = g;

g = s - c / 16;

s = c -  Math.abs(p) / w;

c = a;

a = Math.abs(a + p) / 2048 - p - Math.sign(a - p);

e = Math.abs(a);

if(e - k > 0){

k = e;

}

}

k = 700 / k;

a = 1 / 2;

c = 0;

s = 0;

g = 0;

p = 0;

e = 0;

q = 0;

var m = Array(1200);

u = 0;

for(let j = 1; j < 1200; j += 1){

m[j] = 0;

}

for(let i = 1; i < f; i += 1 ){

p = g;

g = s - c / 16;

s = c -  Math.abs(p) / w;

c = a;

a = Math.abs(a + p) / 2048 - p - Math.sign(a - p);

e = Math.abs(a);

q = 3 / 2 * e * k;

u = Math.round(q) + 1;

m[u]=m[u] + 1;

if(m[u] - t > 0){

t = m[u];

}

cx.beginPath(); 

cx.moveTo(2200 + k * a,900 + k * c);

cx.lineTo(2201 + k * a,900 + k * c);

cx.strokeStyle = "rgba(" + Math.round(Math.abs(k * a / 3)) % 255 +", " + Math.round(Math.abs(k * c / 3)) % 255 +", " + Math.round(Math.abs(k * s / 3)) % 255 +", "+ 1 +")";

cx.stroke();

}

t = 1400 / t;

for(let i = 1; i < 1200; i += 1 ){

cx.beginPath(); 

cx.moveTo( i + 120,1620);

cx.lineTo( i + 120,1620 - t * m[i]);

cx.strokeStyle = "rgb(" + Math.round(15 + i / 5) +", " + Math.round(25 + i / 7) +", " + Math.round(15 + i / 6) +")";

cx.stroke();

}

</script>

</body>

</html>

This code have a properties as and previous. If You enter parameters 50 & 5, for example, You will see something like this

This code is a pure hybrid, and, certainly, is not commercial. Program solve the explicit task, and is not an ethalon of programming.


Popular posts from this blog