Accessibility colors
This commit is contained in:
4
1-1.html
4
1-1.html
@@ -68,12 +68,12 @@
|
|||||||
ctx.lineTo(xPos + 25 * Math.cos(dt * m), yPos + -25 * Math.sin(dt * m));
|
ctx.lineTo(xPos + 25 * Math.cos(dt * m), yPos + -25 * Math.sin(dt * m));
|
||||||
ctx.stroke();
|
ctx.stroke();
|
||||||
//One-dimensional SHM
|
//One-dimensional SHM
|
||||||
ctx.strokeStyle = "#FF0000";
|
ctx.strokeStyle = "#ee0000";
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
ctx.moveTo(xPos, yPos - 25);
|
ctx.moveTo(xPos, yPos - 25);
|
||||||
ctx.lineTo(xPos + 25 * Math.cos(dt * m), yPos - 25);
|
ctx.lineTo(xPos + 25 * Math.cos(dt * m), yPos - 25);
|
||||||
ctx.stroke();
|
ctx.stroke();
|
||||||
ctx.strokeStyle = "#0000FF";
|
ctx.strokeStyle = "#9999ff";
|
||||||
//Mass on spring
|
//Mass on spring
|
||||||
drawSpring(1, 3, 25 * Math.cos(dt * m) + 48, 5, 7, xPos - 50, yPos + 25, tStep);
|
drawSpring(1, 3, 25 * Math.cos(dt * m) + 48, 5, 7, xPos - 50, yPos + 25, tStep);
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
|
|||||||
14
1-2.html
14
1-2.html
@@ -37,7 +37,7 @@
|
|||||||
.greenSlider::-webkit-slider-thumb {
|
.greenSlider::-webkit-slider-thumb {
|
||||||
-webkit-appearance: none;
|
-webkit-appearance: none;
|
||||||
appearance: none;
|
appearance: none;
|
||||||
background: #00ff00;
|
background: #66ff77;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
width: 15px;
|
width: 15px;
|
||||||
height: 15px;
|
height: 15px;
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.greenSlider::-moz-range-thumb {
|
.greenSlider::-moz-range-thumb {
|
||||||
background: #00ff00;
|
background: #66ff77;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
width: 15px;
|
width: 15px;
|
||||||
height: 15px;
|
height: 15px;
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
.redSlider::-webkit-slider-thumb {
|
.redSlider::-webkit-slider-thumb {
|
||||||
-webkit-appearance: none;
|
-webkit-appearance: none;
|
||||||
appearance: none;
|
appearance: none;
|
||||||
background: #ff0000;
|
background: #ee0000;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
width: 15px;
|
width: 15px;
|
||||||
height: 15px;
|
height: 15px;
|
||||||
@@ -75,7 +75,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.redSlider::-moz-range-thumb {
|
.redSlider::-moz-range-thumb {
|
||||||
background: #ff0000;
|
background: #ee0000;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
width: 15px;
|
width: 15px;
|
||||||
height: 15px;
|
height: 15px;
|
||||||
@@ -109,9 +109,9 @@
|
|||||||
var ctx = c.getContext("2d");
|
var ctx = c.getContext("2d");
|
||||||
c.width = window.innerWidth;
|
c.width = window.innerWidth;
|
||||||
c.height = window.innerHeight;
|
c.height = window.innerHeight;
|
||||||
var clx = "#ff0000";
|
var clx = "#ee0000";
|
||||||
var clw = "#00ff00";
|
var clw = "#66ff77";
|
||||||
var clz = "#0000ff";
|
var clz = "#9999ff";
|
||||||
var wR = 0;
|
var wR = 0;
|
||||||
var wRSlider = document.getElementById("wRSlider");
|
var wRSlider = document.getElementById("wRSlider");
|
||||||
var wI = 0;
|
var wI = 0;
|
||||||
|
|||||||
@@ -101,7 +101,7 @@
|
|||||||
ctx.moveTo(xPos + 5 + 80 * n / nmax, yPos + y1[n % nn1][m % mm1] + y3[n % nn2][m % mm2] + 75);
|
ctx.moveTo(xPos + 5 + 80 * n / nmax, yPos + y1[n % nn1][m % mm1] + y3[n % nn2][m % mm2] + 75);
|
||||||
ctx.lineTo(xPos + 5 + 80 * (n + 1) / nmax, yPos + y1[(n + 1) % nn1][m % mm1] + y3[(n + 1) % nn2][m % mm2] + 75);
|
ctx.lineTo(xPos + 5 + 80 * (n + 1) / nmax, yPos + y1[(n + 1) % nn1][m % mm1] + y3[(n + 1) % nn2][m % mm2] + 75);
|
||||||
ctx.stroke();
|
ctx.stroke();
|
||||||
ctx.strokeStyle = "#ff0000";
|
ctx.strokeStyle = "#ee0000";
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
ctx.moveTo(xPos + 5 + 80 * n / nmax, yPos + 75 + 20 * Math.cos(Math.PI * (n / nn1 - n / nn2 - m / mm1 + m / mm2)));
|
ctx.moveTo(xPos + 5 + 80 * n / nmax, yPos + 75 + 20 * Math.cos(Math.PI * (n / nn1 - n / nn2 - m / mm1 + m / mm2)));
|
||||||
ctx.lineTo(xPos + 5 + 80 * (n + 1) / nmax, yPos + 75 + 20 * Math.cos(Math.PI * ((n + 1) / nn1 - (n + 1) / nn2 - m / mm1 + m / mm2)));
|
ctx.lineTo(xPos + 5 + 80 * (n + 1) / nmax, yPos + 75 + 20 * Math.cos(Math.PI * ((n + 1) / nn1 - (n + 1) / nn2 - m / mm1 + m / mm2)));
|
||||||
|
|||||||
@@ -110,7 +110,7 @@
|
|||||||
{
|
{
|
||||||
for (n = -nn/2; n <= -1; n++)
|
for (n = -nn/2; n <= -1; n++)
|
||||||
{
|
{
|
||||||
ctx.strokeStyle = "#ff0000";
|
ctx.strokeStyle = "#ee0000";
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
ctx.moveTo(xPos + 100 * n / nn, yPos + 20 * (y(n - t) + r * y(-n -t)) + 50);
|
ctx.moveTo(xPos + 100 * n / nn, yPos + 20 * (y(n - t) + r * y(-n -t)) + 50);
|
||||||
ctx.lineTo(xPos + 100 * (n + 1) / nn, yPos + 20 * (y(n + 1 - t) + r * y( - n - 1 - t)) + 50);
|
ctx.lineTo(xPos + 100 * (n + 1) / nn, yPos + 20 * (y(n + 1 - t) + r * y( - n - 1 - t)) + 50);
|
||||||
@@ -118,7 +118,7 @@
|
|||||||
}
|
}
|
||||||
if (eps == 0)
|
if (eps == 0)
|
||||||
{
|
{
|
||||||
ctx.strokeStyle = "#0000ff";
|
ctx.strokeStyle = "#9999ff";
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
ctx.moveTo(xPos, yPos + 20 * tau * y(-t) + 50);
|
ctx.moveTo(xPos, yPos + 20 * tau * y(-t) + 50);
|
||||||
ctx.lineTo(xPos + 50, yPos + 20 * tau * y(-t) + 50);
|
ctx.lineTo(xPos + 50, yPos + 20 * tau * y(-t) + 50);
|
||||||
@@ -127,7 +127,7 @@
|
|||||||
{
|
{
|
||||||
for (n = 0; n <= eps * nn / 2 - 1; n++)
|
for (n = 0; n <= eps * nn / 2 - 1; n++)
|
||||||
{
|
{
|
||||||
ctx.strokeStyle = "#0000ff";
|
ctx.strokeStyle = "#9999ff";
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
ctx.moveTo(xPos + 100 * n / nn / eps, yPos + 20 * tau * y(n-t) + 50);
|
ctx.moveTo(xPos + 100 * n / nn / eps, yPos + 20 * tau * y(n-t) + 50);
|
||||||
ctx.lineTo(xPos + 100 * (n + 1) / nn / eps, yPos + 20 * tau * y((n + 1)-t) + 50);
|
ctx.lineTo(xPos + 100 * (n + 1) / nn / eps, yPos + 20 * tau * y((n + 1)-t) + 50);
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
var ctx = c.getContext("2d");
|
var ctx = c.getContext("2d");
|
||||||
c.width = window.innerWidth;
|
c.width = window.innerWidth;
|
||||||
c.height = window.innerHeight;
|
c.height = window.innerHeight;
|
||||||
var cll = "#ff0000";
|
var cll = "#ee0000";
|
||||||
var dz = 10;
|
var dz = 10;
|
||||||
var nxb = 25;
|
var nxb = 25;
|
||||||
var nyb = 25;
|
var nyb = 25;
|
||||||
|
|||||||
@@ -39,9 +39,9 @@
|
|||||||
var l2 = l1 * n1/n2;
|
var l2 = l1 * n1/n2;
|
||||||
var theta1 = .5;
|
var theta1 = .5;
|
||||||
var theta2 = Math.atan(n1 * Math.sin(theta1) / n2 / Math.sqrt(1 - (Math.pow(n1 * Math.sin(theta1) / n2 , 2))));
|
var theta2 = Math.atan(n1 * Math.sin(theta1) / n2 / Math.sqrt(1 - (Math.pow(n1 * Math.sin(theta1) / n2 , 2))));
|
||||||
var clv = "#ff0000";
|
var clv = "#ee0000";
|
||||||
var cll = "#00ff00";
|
var cll = "#66ff77";
|
||||||
var clb = "#0000ff";
|
var clb = "#9999ff";
|
||||||
var xPos = 0;
|
var xPos = 0;
|
||||||
var yPos = -35;
|
var yPos = -35;
|
||||||
var xPosA = 10;
|
var xPosA = 10;
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
var dxy = 80 / nx;
|
var dxy = 80 / nx;
|
||||||
var stepX = 0.1;
|
var stepX = 0.1;
|
||||||
var stepY = 0.1;
|
var stepY = 0.1;
|
||||||
var clp = "#0000ff";
|
var clp = "#9999ff";
|
||||||
var cll = "#000000";
|
var cll = "#000000";
|
||||||
var xPos = -45;
|
var xPos = -45;
|
||||||
var yPos = -30;
|
var yPos = -30;
|
||||||
|
|||||||
@@ -46,8 +46,8 @@
|
|||||||
var dd = 2 * dxy * ny;
|
var dd = 2 * dxy * ny;
|
||||||
var stepX = 0.1;
|
var stepX = 0.1;
|
||||||
var stepY = 0.1;
|
var stepY = 0.1;
|
||||||
var clp = "#0000ff";
|
var clp = "#9999ff";
|
||||||
var otherColor = "#ff0000";
|
var otherColor = "#ee0000";
|
||||||
var cll = "#000000";
|
var cll = "#000000";
|
||||||
var xPos = -45;
|
var xPos = -45;
|
||||||
var yPos = -30;
|
var yPos = -30;
|
||||||
|
|||||||
@@ -107,9 +107,9 @@
|
|||||||
var phi2 = 0;
|
var phi2 = 0;
|
||||||
var dt = .03;
|
var dt = .03;
|
||||||
var t = 0;
|
var t = 0;
|
||||||
var cl1 = "#ff0000";
|
var cl1 = "#ee0000";
|
||||||
var cl2 = "#00ff00";
|
var cl2 = "#66ff77";
|
||||||
var cl3 = "#0000ff";
|
var cl3 = "#9999ff";
|
||||||
var cl4 = "#000000";
|
var cl4 = "#000000";
|
||||||
var nmu = 10;
|
var nmu = 10;
|
||||||
var nphi = 0;
|
var nphi = 0;
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
|
|
||||||
var f = 50;
|
var f = 50;
|
||||||
var cll = "#000000";
|
var cll = "#000000";
|
||||||
var clb = "#0000ff";
|
var clb = "#9999ff";
|
||||||
var nxb = 3;
|
var nxb = 3;
|
||||||
var nyb = 3;
|
var nyb = 3;
|
||||||
var dt = .03;
|
var dt = .03;
|
||||||
@@ -190,7 +190,7 @@
|
|||||||
ctx.lineTo(xPos + px1, yPos + py1);
|
ctx.lineTo(xPos + px1, yPos + py1);
|
||||||
ctx.stroke();
|
ctx.stroke();
|
||||||
}
|
}
|
||||||
ctx.strokeStyle = "#00ffff";
|
ctx.strokeStyle = "#ee0000";
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
ctx.moveTo(xPos + xs, yPos + fnys(pxs, pf, px0, py0, px1, py1));
|
ctx.moveTo(xPos + xs, yPos + fnys(pxs, pf, px0, py0, px1, py1));
|
||||||
ctx.lineTo(xPos + px1, yPos + py1);
|
ctx.lineTo(xPos + px1, yPos + py1);
|
||||||
|
|||||||
@@ -180,7 +180,7 @@
|
|||||||
ctx.strokeStyle = Colorify((j % 5) + 3);
|
ctx.strokeStyle = Colorify((j % 5) + 3);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
{
|
{
|
||||||
//ctx.strokeStyle = "#00ff00";
|
//ctx.strokeStyle = "#66ff77";
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
ctx.moveTo(xPos + v * r - scrwidth / 3, yPos);
|
ctx.moveTo(xPos + v * r - scrwidth / 3, yPos);
|
||||||
ctx.lineTo(xPos + rmax * cost * gaminv + v * r - scrwidth / 3, yPos + rmax * sint);
|
ctx.lineTo(xPos + rmax * cost * gaminv + v * r - scrwidth / 3, yPos + rmax * sint);
|
||||||
@@ -213,7 +213,7 @@
|
|||||||
ctx.stroke();
|
ctx.stroke();
|
||||||
if (theta - thetap > dth)
|
if (theta - thetap > dth)
|
||||||
{
|
{
|
||||||
//ctx.strokeStyle = "#0000ff";
|
//ctx.strokeStyle = "#9999ff";
|
||||||
console.log(thetap);
|
console.log(thetap);
|
||||||
console.log(theta);
|
console.log(theta);
|
||||||
for (thj = thetap; thj <= theta; thj += dth)
|
for (thj = thetap; thj <= theta; thj += dth)
|
||||||
|
|||||||
@@ -66,8 +66,8 @@
|
|||||||
|
|
||||||
var nn = 1.35;
|
var nn = 1.35;
|
||||||
var r = 75;
|
var r = 75;
|
||||||
var cl4 = "#ff0000";
|
var cl4 = "#ee0000";
|
||||||
var cl17 = "#0000ff";
|
var cl17 = "#9999ff";
|
||||||
var cl15 = "#000000";
|
var cl15 = "#000000";
|
||||||
var red = false;
|
var red = false;
|
||||||
var blue = false;
|
var blue = false;
|
||||||
|
|||||||
@@ -89,8 +89,8 @@
|
|||||||
|
|
||||||
var nn = 1.35;
|
var nn = 1.35;
|
||||||
var r = 25;
|
var r = 25;
|
||||||
var cl4 = "#ff0000";
|
var cl4 = "#ee0000";
|
||||||
var cl17 = "#0000ff";
|
var cl17 = "#9999ff";
|
||||||
var cl15 = "#000000";
|
var cl15 = "#000000";
|
||||||
var red = false;
|
var red = false;
|
||||||
var blue = false;
|
var blue = false;
|
||||||
@@ -151,26 +151,26 @@
|
|||||||
if (red)
|
if (red)
|
||||||
{
|
{
|
||||||
maxReflections = 1;
|
maxReflections = 1;
|
||||||
Ray(new Vector2(1 - c.width, h2 * r + y0), new Vector2(1, 0), 1, 1.332, "#ff0000");
|
Ray(new Vector2(1 - c.width, h2 * r + y0), new Vector2(1, 0), 1, 1.332, "#ee0000");
|
||||||
maxReflections = 2;
|
maxReflections = 2;
|
||||||
Ray(new Vector2(1 - c.width, - h2 * r + y1), new Vector2(1, 0), 1, 1.332, "#ff0000");
|
Ray(new Vector2(1 - c.width, - h2 * r + y1), new Vector2(1, 0), 1, 1.332, "#ee0000");
|
||||||
}
|
}
|
||||||
if (blue)
|
if (blue)
|
||||||
{
|
{
|
||||||
maxReflections = 1;
|
maxReflections = 1;
|
||||||
Ray(new Vector2(1 - c.width, h2 * r + y0), new Vector2(1, 0), 1, 1.35, "#0000ff");
|
Ray(new Vector2(1 - c.width, h2 * r + y0), new Vector2(1, 0), 1, 1.35, "#9999ff");
|
||||||
maxReflections = 2;
|
maxReflections = 2;
|
||||||
Ray(new Vector2(1 - c.width, - h2 * r + y1), new Vector2(1, 0), 1, 1.35, "#0000ff");
|
Ray(new Vector2(1 - c.width, - h2 * r + y1), new Vector2(1, 0), 1, 1.35, "#9999ff");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*Ray(new Vector2(1 - c.width, 2 * r / 3 + y0), new Vector2(1, 0.00), 1, 1.332, "#ff0000");
|
/*Ray(new Vector2(1 - c.width, 2 * r / 3 + y0), new Vector2(1, 0.00), 1, 1.332, "#ee0000");
|
||||||
//Ray(new Vector2(r / 2, c.height - 1), new Vector2(-0.03, -1), 0.1, 1.332, "#ff0000");
|
//Ray(new Vector2(r / 2, c.height - 1), new Vector2(-0.03, -1), 0.1, 1.332, "#ee0000");
|
||||||
Ray(new Vector2(1 - c.width, 2 * r / 3 + y0), new Vector2(1, 0.00), 1, 1.35, "#0000ff");
|
Ray(new Vector2(1 - c.width, 2 * r / 3 + y0), new Vector2(1, 0.00), 1, 1.35, "#9999ff");
|
||||||
maxReflections = 2;
|
maxReflections = 2;
|
||||||
Ray(new Vector2(1 - c.width, - 15 * r / 16 + y1), new Vector2(1, 0.00), 1, 1.332, "#ff0000");
|
Ray(new Vector2(1 - c.width, - 15 * r / 16 + y1), new Vector2(1, 0.00), 1, 1.332, "#ee0000");
|
||||||
//Ray(new Vector2(r / 2, c.height - 1), new Vector2(-0.03, -1), 0.1, 1.332, "#ff0000");
|
//Ray(new Vector2(r / 2, c.height - 1), new Vector2(-0.03, -1), 0.1, 1.332, "#ee0000");
|
||||||
Ray(new Vector2(1 - c.width, - 15 * r / 16 + y1), new Vector2(1, 0.00), 1, 1.35, "#0000ff");
|
Ray(new Vector2(1 - c.width, - 15 * r / 16 + y1), new Vector2(1, 0.00), 1, 1.35, "#9999ff");
|
||||||
//setTimeout(Update, 1000/60);*/
|
//setTimeout(Update, 1000/60);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
10
water20.html
10
water20.html
@@ -103,10 +103,10 @@
|
|||||||
h = this.value;
|
h = this.value;
|
||||||
if (h > 143)
|
if (h > 143)
|
||||||
{
|
{
|
||||||
document.getElementById("ampSlider").style.backgroundColor = "#ff0000";
|
document.getElementById("ampSlider").style.backgroundColor = "#ee0000";
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
document.getElementById("ampSlider").style.backgroundColor = "#0000ff";
|
document.getElementById("ampSlider").style.backgroundColor = "#9999ff";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -167,7 +167,7 @@
|
|||||||
|
|
||||||
function Draw()
|
function Draw()
|
||||||
{
|
{
|
||||||
ctx.strokeStyle = "#0000ff";
|
ctx.strokeStyle = "#9999ff";
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
ctx.moveTo(-scrwidth, yPos);
|
ctx.moveTo(-scrwidth, yPos);
|
||||||
ctx.lineTo(scrwidth, yPos);
|
ctx.lineTo(scrwidth, yPos);
|
||||||
@@ -179,7 +179,7 @@
|
|||||||
{
|
{
|
||||||
x = 1.1 * scrwidth * (-1 + 2 * jj / nn);
|
x = 1.1 * scrwidth * (-1 + 2 * jj / nn);
|
||||||
xx = jj / nn * kw;
|
xx = jj / nn * kw;
|
||||||
ctx.strokeStyle = "#0000ff";
|
ctx.strokeStyle = "#9999ff";
|
||||||
ctx.lineTo(xPos + x - h * Math.sin(xx - t), yPos + htn * h * Math.cos(xx - t) + depth);
|
ctx.lineTo(xPos + x - h * Math.sin(xx - t), yPos + htn * h * Math.cos(xx - t) + depth);
|
||||||
}
|
}
|
||||||
ctx.stroke();
|
ctx.stroke();
|
||||||
@@ -228,7 +228,7 @@
|
|||||||
ctx.lineTo(xPos - h * Math.sin(xx - t) - 4, yPos + htn * h * Math.cos(xx - t) - 16 + depth);
|
ctx.lineTo(xPos - h * Math.sin(xx - t) - 4, yPos + htn * h * Math.cos(xx - t) - 16 + depth);
|
||||||
ctx.stroke();
|
ctx.stroke();
|
||||||
}
|
}
|
||||||
ctx.strokeStyle = "#ff0000";
|
ctx.strokeStyle = "#ee0000";
|
||||||
if (trace)
|
if (trace)
|
||||||
{
|
{
|
||||||
for (p = 0; p <= 101; p+= 0.1)
|
for (p = 0; p <= 101; p+= 0.1)
|
||||||
|
|||||||
Reference in New Issue
Block a user