-
Notifications
You must be signed in to change notification settings - Fork 0
/
ewaldsphere2.html
90 lines (84 loc) · 3.39 KB
/
ewaldsphere2.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<!DOCTYPE html>
<title>Ewald Sphere Tutorial</title>
<link rel="stylesheet" href="index.css">
<body onload="setup();">
<nav>
<a href="ewaldintro.html">Introduction</a>
<a href="ewaldsphere1.html">1</a>
<a href="ewaldsphere2.html">2</a>
<a href="ewaldsphere3.html">3</a>
<a href="ewaldsphere4.html">4</a>
<a href="ewaldsphere5.html">5</a>
</nav>
<div id="controls">
<div>
<label>Rotate crystal around Z</label><br>
<input type="range" min="-45" max="45" value="0" id="anglez" hidden><br>
<button id="rotl5z">⟲</button>
<button id="rotl1z">↶</button>
<span>θ = <span id="thetaz">0</span>°</span>
<button id="rotr1z">↷</button>
<button id="rotr5z">⟳</button>
</div>
<div>
<button id="clear">Clear detector</button>
<button id="recentre">Reset view</button>
</div>
<div>
<input type="checkbox" id="fullbeams" name="fullbeams" Checked>
<label for="fullbeams">Show Full Beams</label>
</div>
<div>
<label for="a">Unit Cell Length in Å</label><br>
<input type="number" id="a" min="10" max="20" onchange="updateunitcelldimensions()" value="20">
</div>
<div>
<label>Rotate camera</label><br>
<input type="range" min="0" max="180" value="1" id="camera">
</div>
<div><img src="axes.png"/></div>
</div>
<canvas id="canvas"></canvas>
<div id="instructions">
<h2>Cubic unit cell diffraction</h2>
<p>Now we will look at a larger crystal - in this case with 20 Angstrom cell axes.</p>
<p>
Rotate the crystal 1° counterclockwise. A number of spots should appear on the top half of the detector.
By looking at the view edge on, you should be able to see that some of these come from the
(<span style="text-decoration:overline">1</span>kl) layer and some from the
(<span style="text-decoration:overline">2</span>kl) layer.
Continue to rotate the crystal until the (010) spot appears near the centre of the detector. What is θ for this reflection?
</p>
<p>
Clear the detector and continue to rotate the crystal until you see lunes emerging.
How far can you rotate the crystal before the first overlapping spots appear?
In a real experiment we would need to start collecting a new image before this point.
The larger the unit cell, the smaller the angle through which we can rotate the crystal while collecting a single image.
</p>
<p>
Rotate the crystal to θ=20° and clear the detector. Position the camera for an edge-on view, and rotate the crystal counter clockwise until the first (1kl) spot appears. What is θ?
</p>
</div>
<script>
var spacinga = 100 / 3;
var spacingb = 100 / 3;
var spacingc = 100 / 3;
var alpha = 90;
var beta = 90;
default_camera = 1;
</script>
<script src="three.js"></script>
<script src="OrbitControls.js"></script>
<script src="index.js"></script>
<script>
function updateunitcelldimensions() {
spacinga = 100 / Number(document.getElementById("a").value);
spacingb = 100 / Number(document.getElementById("a").value);
spacingc = 100 / Number(document.getElementById("a").value);
alpha = 90;
beta = 90;
updateunitcell();
reset();
}
</script>
</body>