This is an old revision of the document!
Value of Two Prisms Stacked in the Same Direction (Prism Diopters)
Calculator
<html> <head>
<title>Stacked Prism Value Lookup</title>
<style>
#header {
display: none;
}
body {
font-family: Arial, sans-serif;
margin: 20px;
padding: 20px;
}
h2 {
color: #333;
}
label {
font-weight: bold;
}
input, button {
margin-top: 5px;
padding: 8px;
font-size: 16px;
}
p {
font-size: 18px;
font-weight: bold;
color: blue;
margin-top: 10px;
}
</style>
<script>
const prismTable = {
10: {10: 21, 20: 33, 30: 46, 40: 60, 50: 77},
20: {10: 33, 20: 47, 30: 66, 40: 89, 50: 122},
30: {10: 46, 20: 66, 30: 94, 40: 141, 50: 256},
40: {10: 60, 20: 89, 30: 141,40: 339},
50: {10: 77, 20: 122, 30: 256},
};
function lookupValue() {
let prism1 = document.querySelector('input[name="prism1"]:checked').value;
let prism2 = document.querySelector('input[name="prism2"]:checked').value;
prism1 = parseInt(prism1);
prism2 = parseInt(prism2);
if (prismTable[prism2] && prismTable[prism2][prism1] !== undefined) {
document.getElementById("result").innerHTML = `Result: <strong>${prismTable[prism2][prism1]} Prism Diopters</strong>`;
} else {
document.getElementById("result").innerText = "Invalid input";
}
}
</script>
</head> <body>
<h2 id="header">Prism Value of Two Prisms Stacked in the Same Direction</h2> <label for="prism1">Select Prism 1 (PD): </label> <br> <input type="radio" name="prism1" value="10"> 10 <input type="radio" name="prism1" value="20"> 20 <input type="radio" name="prism1" value="30"> 30 <input type="radio" name="prism1" value="40"> 40 <input type="radio" name="prism1" value="50"> 50 <br><br> <label>Select Prism 2 (PD):</label> <br> <input type="radio" name="prism2" value="10"> 10 <input type="radio" name="prism2" value="20"> 20 <input type="radio" name="prism2" value="30"> 30 <input type="radio" name="prism2" value="40"> 40 <input type="radio" name="prism2" value="50"> 50 <br><br> <button onclick="lookupValue()">Lookup</button> <br> <br> <p id="result"></p>
</body> </html> <button type=“primary” size=“sm”>Reset Calculator</button>
Table
| 1st Prism | |||||
| 2nd Prism | 10Δ | 20Δ | 30Δ | 40Δ | 50Δ |
| 10Δ | 21 | 33 | 46 | 60 | 77 |
| 20Δ | 33 | 47 | 66 | 89 | 122 |
| 30Δ | 46 | 66 | 94 | 141 | 264 |
| 40Δ | 60 | 89 | 141 | 339 | |
| 50Δ | 77 | 122 | 256 | ||