Skip to content

Commit dc56bc8

Browse files
committed
docu
1 parent d77a71b commit dc56bc8

13 files changed

+164
-113
lines changed

images/CrystalOperations_01.png

154 KB
Loading

images/CrystalOperations_02.png

258 KB
Loading

images/CrystalOperations_03.png

279 KB
Loading

images/CrystalOperations_04.png

292 KB
Loading

images/CrystalOperations_05.png

294 KB
Loading

images/CrystalOperations_06.png

296 KB
Loading

images/CrystalOperations_07.png

89.6 KB
Loading

images/CrystalOperations_08.png

142 KB
Loading

images/CrystalOperations_09.png

142 KB
Loading

pages/documentation_matlab/CrystalOperations.html

Lines changed: 159 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -23,114 +23,109 @@
2323
<div>
2424
<!--introduction-->
2525
<!--/introduction-->
26-
<p>In this section we discuss basic operations with crystal directions. Therefore, lets start by importing the trigonal Quartz crystal symmetry</p>
26+
<p>In this section we discuss basic operations with crystal directions. Therefore, lets start by importing and plotting a simulated quartz Kikuchi pattern</p>
2727
{% highlight matlab %}
28-
cs = loadCIF('quartz');
29-
{% endhighlight %}
30-
<p>and consider two hexagonal prism normals</p>
31-
{% highlight matlab %}
32-
m1 = Miller(1,-1,0,0,cs)
33-
m2 = Miller(1,0,-1,0,cs)
34-
35-
plot(m1,'upper','labeled','backgroundColor','w')
36-
hold on
37-
plot(m2,'labeled','backgroundColor','w')
38-
hold off
39-
{% endhighlight %}
28+
data = load([mtexDataPath filesep 'quartzPattern.mat']);
29+
pattern = data.pattern;
4030

41-
{% highlight plaintext %}
42-
m1 = Miller (Quartz)
43-
h k i l
44-
1 -1 0 0
45-
46-
m2 = Miller (Quartz)
47-
h k i l
48-
1 0 -1 0
31+
[~,ax1] = plot(pattern,'resolution',0.25*degree,'complete','upper',"uvw");
32+
mtexColorMap black2white
33+
nextAxis
34+
[~,ax2] = plot(pattern.radon,'resolution',0.25*degree,'complete','upper','hkl');
35+
mtexColorMap black2white
4936
{% endhighlight %}
5037
<center>
5138
{% include inline_image.html file="CrystalOperations_01.png" %}
5239
</center>
53-
<h2 id="3">Zone Axes</h2>
54-
<p>Both prism planes intersects in a common zone axis which is orthogonal to both plane normals can is computed by</p>
40+
<p>Next we consider the most reflective lattice planes in Quartz which are positive and negative rhomboedron planes as well as the hexagonal prism planes</p>
5541
{% highlight matlab %}
56-
d = round(cross(m1,m2))
42+
% extract the crystal symmetry
43+
cs = pattern.CS
44+
45+
m = Miller(-1,0,1,0,cs,'hkil'); % hexagonal prism
46+
r = Miller(0,-1,1,1,cs,'hkil'); % positive rhomboedron
47+
z = Miller(0,1,-1,1,cs,'hkil'); % negative rhomboedron
5748
{% endhighlight %}
5849

5950
{% highlight plaintext %}
60-
d = Miller (Quartz)
61-
U V T W
62-
0 0 0 1
63-
{% endhighlight %}
64-
<p>Note that MTEX automatically switches from reciprocal to direct coordinates for displaying the zone axis.</p>
65-
<p>The other way round two, not parallel, zone axes</p>
66-
{% highlight matlab %}
67-
d1 = Miller(0,0,0,1,cs,'UVTW');
68-
d2 = Miller(1,-2,1,3,cs,'UVTW');
51+
cs = crystalSymmetry
52+
53+
mineral : alpha-quartz low
54+
symmetry : 321
55+
elements : 6
56+
a, b, c : 0.49, 0.49, 0.54
57+
reference frame: X||a, Y||b*, Z||c*
6958
{% endhighlight %}
70-
<p>span a lattice plane with normal vector</p>
59+
<p>and visualize them as planes in the Kikuchi pattern and as points in the dual pattern</p>
7160
{% highlight matlab %}
72-
round(cross(d1,d2))
73-
{% endhighlight %}
61+
hold on
62+
circle(m,'parent',ax1,'color','lightBlue')
63+
circle(r,'parent',ax1,'color','red')
64+
circle(z,'parent',ax1,'color','yellow')
7465

75-
{% highlight plaintext %}
76-
ans = Miller (Quartz)
77-
h k i l
78-
1 0 -1 0
66+
opt = {'marker','s','MarkerFaceColor','none','parent',ax2,...
67+
'labeled','backgroundColor','w','linewidth',2};
68+
plot(m,opt{:},'markerEdgeColor','lightBlue')
69+
plot(r,opt{:},'markerEdgeColor','red')
70+
plot(z,opt{:},'markerEdgeColor','yellow')
7971
{% endhighlight %}
80-
<h2 id="6">Symmetrically Equivalent Crystal Directions</h2>
72+
<center>
73+
{% include inline_image.html file="CrystalOperations_02.png" %}
74+
</center>
75+
<h2 id="4">Symmetrically Equivalent Crystal Directions</h2>
8176
<p>Since crystal lattices are symmetric lattice directions can be grouped into classes of symmetrically equivalent directions. Those groups can be derived by permuting the Miller indices (uvw). The class of all directions symmetrically equivalent to (uvw) is commonly denoted by <a href="uvw">uvw</a>, while the class of all lattice planes symmetrically equivalent to the plane (hkl) is denoted by {hkl}. Given a lattice direction or a lattice plane all symmetrically equivalent directions and planes are computed by the command <a href="Miller.symmetrise.html"><code class="language-plaintext highlighter-rouge">symmetrise</code></a>
8277
</p>
8378
{% highlight matlab %}
84-
symmetrise(d2)
79+
symmetrise(r)
8580
{% endhighlight %}
8681

8782
{% highlight plaintext %}
88-
ans = Miller (Quartz)
83+
ans = Miller (alpha-quartz low)
8984
size: 6 x 1
90-
U V T W
91-
1 -2 1 3
92-
1 1 -2 -3
93-
1 1 -2 3
94-
1 -2 1 -3
95-
-2 1 1 3
96-
-2 1 1 -3
85+
h k i l
86+
0 -1 1 1
87+
0 1 -1 -1
88+
1 0 -1 1
89+
1 -1 0 -1
90+
-1 1 0 1
91+
-1 0 1 -1
92+
{% endhighlight %}
93+
<p>Lets add all symmetrically equivalent planes and directions on top of the Kikuchi pattern. Note that you may also use the options <code class="language-plaintext highlighter-rouge">'symmetrise'</code> together with the <code class="language-plaintext highlighter-rouge">plot</code> command.</p>
94+
{% highlight matlab %}
95+
hold on
96+
circle(m.symmetrise,'parent',ax1,'color','lightBlue')
97+
circle(r.symmetrise,'parent',ax1,'color','red')
98+
circle(z.symmetrise,'parent',ax1,'color','yellow')
99+
100+
plot(m,opt{:},'markerEdgeColor','lightBlue','symmetrised')
101+
plot(r,opt{:},'markerEdgeColor','red','symmetrised')
102+
plot(z,opt{:},'markerEdgeColor','yellow','symmetrised')
97103
{% endhighlight %}
98-
<p>As always the keyword <a href="VectorsAxes.html"><code class="language-plaintext highlighter-rouge">'antipodal'</code></a> adds antipodal symmetry to this computation</p>
104+
<center>
105+
{% include inline_image.html file="CrystalOperations_03.png" %}
106+
</center>
107+
<p>As always the keyword <a href="VectorsAxes.html"><code class="language-plaintext highlighter-rouge">'antipodal'</code></a> adds antipodal symmetry</p>
99108
{% highlight matlab %}
100-
symmetrise(d2,'antipodal')
109+
symmetrise(r,'antipodal')
101110
{% endhighlight %}
102111

103112
{% highlight plaintext %}
104-
ans = Miller (Quartz)
113+
ans = Miller (alpha-quartz low)
105114
size: 12 x 1
106-
U V T W
107-
1 -2 1 3
108-
-1 2 -1 -3
109-
1 1 -2 -3
110-
-1 -1 2 3
111-
1 1 -2 3
112-
-1 -1 2 -3
113-
1 -2 1 -3
114-
-1 2 -1 3
115-
-2 1 1 3
116-
2 -1 -1 -3
117-
-2 1 1 -3
118-
2 -1 -1 3
119-
{% endhighlight %}
120-
<p>Using the options <code class="language-plaintext highlighter-rouge">'symmetrised'</code> and <code class="language-plaintext highlighter-rouge">'labeled'</code> all symmetrically equivalent crystal directions are plotted together with their Miller indices. Lets apply this to a list of lattice planes</p>
121-
{% highlight matlab %}
122-
h = Miller({1,0,-1,0},{1,1,-2,0},{1,0,-1,1},{1,1,-2,1},{0,0,0,1},cs);
123-
124-
for i = 1:length(h)
125-
plot(h(i),'symmetrised','labeled','backgroundColor','w','grid','upper','doNotDraw')
126-
hold all
127-
end
128-
hold off
129-
drawNow(gcm,'figSize','normal')
115+
h k i l
116+
0 -1 1 1
117+
0 1 -1 -1
118+
0 1 -1 -1
119+
0 -1 1 1
120+
1 0 -1 1
121+
-1 0 1 -1
122+
1 -1 0 -1
123+
-1 1 0 1
124+
-1 1 0 1
125+
1 -1 0 -1
126+
-1 0 1 -1
127+
1 0 -1 1
130128
{% endhighlight %}
131-
<center>
132-
{% include inline_image.html file="CrystalOperations_02.png" %}
133-
</center>
134129
<p>The command <a href="vector3d.eq.html"><code class="language-plaintext highlighter-rouge">eq</code> or <code class="language-plaintext highlighter-rouge">==</code></a> can be used to check whether two crystal directions are symmetrically equivalent. Compare</p>
135130
{% highlight matlab %}
136131
Miller(1,1,-2,0,cs) == Miller(-1,-1,2,0,cs)
@@ -151,8 +146,57 @@ <h2 id="6">Symmetrically Equivalent Crystal Directions</h2>
151146
logical
152147
1
153148
{% endhighlight %}
154-
<h2 id="11">Angles</h2>
155-
<p>The angle between two crystal directions <code class="language-plaintext highlighter-rouge">m1</code> and <code class="language-plaintext highlighter-rouge">m2</code> is defined as the smallest angle between <code class="language-plaintext highlighter-rouge">m1</code> and all symmetrically equivalent directions to <code class="language-plaintext highlighter-rouge">m2</code>. This angle is in radiant and it is calculated by the function <a href="vector3d.angle.html"><code class="language-plaintext highlighter-rouge">angle(m1,m2)</code></a>
149+
<h2 id="9">Zone Axes</h2>
150+
<p>The intersection of two lattice planes is called zone axis. Mathematically it is computed by the cross product between the corresponding norm vectors.</p>
151+
{% highlight matlab %}
152+
d1 = round(cross(m,r))
153+
154+
plot(d1,'marker','s','parent',ax1,'MarkerFaceColor','lightgreen','labeled','backgroundColor','w')
155+
circle(d1,'parent',ax2,'linecolor','lightgreen')
156+
{% endhighlight %}
157+
158+
{% highlight plaintext %}
159+
d1 = Miller (alpha-quartz low)
160+
U V T W
161+
-1 2 -1 3
162+
{% endhighlight %}
163+
<center>
164+
{% include inline_image.html file="CrystalOperations_04.png" %}
165+
</center>
166+
<p>Note that MTEX automatically switches from reciprocal to direct coordinates for displaying the zone axis. The command <code class="language-plaintext highlighter-rouge"><a href="Miller.round.html">round</a></code> is required in order have the direction be scaled to integer Miller indices. Let us now consider a second crystal direction</p>
167+
{% highlight matlab %}
168+
d2 = Miller(-2,0,1,cs,'uvw')
169+
170+
plot(d2,'marker','s','parent',ax1,'MarkerFaceColor','Orange','labeled','backgroundColor','w')
171+
circle(d2,'parent',ax2,'linecolor','orange')
172+
{% endhighlight %}
173+
174+
{% highlight plaintext %}
175+
d2 = Miller (alpha-quartz low)
176+
u v w
177+
-2 0 1
178+
{% endhighlight %}
179+
<center>
180+
{% include inline_image.html file="CrystalOperations_05.png" %}
181+
</center>
182+
<p>The two crystal directions <code class="language-plaintext highlighter-rouge">d1</code> and <code class="language-plaintext highlighter-rouge">d2</code> span a lattice plane which once again can be computed by the cross product of <code class="language-plaintext highlighter-rouge">d1</code> and <code class="language-plaintext highlighter-rouge">d2</code>. In the Kikuchi pattern the lattice plane corresponds to the band connecting <code class="language-plaintext highlighter-rouge">d1</code> and <code class="language-plaintext highlighter-rouge">d2</code> where as in the dual Kikuchi pattern it coincides with the intersection of the two great circles representing <code class="language-plaintext highlighter-rouge">d1</code> and <code class="language-plaintext highlighter-rouge">d2</code>.</p>
183+
{% highlight matlab %}
184+
n = round(cross(d1,d2))
185+
186+
circle(n,'parent',ax1,'linecolor','white')
187+
plot(n,opt{:},'MarkerEdgeColor','white')
188+
{% endhighlight %}
189+
190+
{% highlight plaintext %}
191+
n = Miller (alpha-quartz low)
192+
h k i l
193+
1 -2 1 2
194+
{% endhighlight %}
195+
<center>
196+
{% include inline_image.html file="CrystalOperations_06.png" %}
197+
</center>
198+
<h2 id="12">Angles</h2>
199+
<p>The angle between two crystal directions <code class="language-plaintext highlighter-rouge">d1</code> and <code class="language-plaintext highlighter-rouge">d2</code> is defined as the smallest angle between <code class="language-plaintext highlighter-rouge">d1</code> and all symmetrically equivalent directions to <code class="language-plaintext highlighter-rouge">d2</code>. This angle is in radiant and it is calculated by the function <a href="vector3d.angle.html"><code class="language-plaintext highlighter-rouge">angle(d1,d2)</code></a>
156200
</p>
157201
{% highlight matlab %}
158202
angle(Miller(1,1,-2,0,cs),Miller(-1,-1,2,0,cs)) / degree
@@ -169,7 +213,7 @@ <h2 id="11">Angles</h2>
169213

170214
{% highlight plaintext %}
171215
ans =
172-
0
216+
1.2074e-06
173217
{% endhighlight %}
174218
<p>In order to ignore the crystal symmetry, i.e., to compute the actual angle between two directions use the option <code class="language-plaintext highlighter-rouge">'noSymmetry'</code>
175219
</p>
@@ -179,67 +223,78 @@ <h2 id="11">Angles</h2>
179223

180224
{% highlight plaintext %}
181225
ans =
182-
180
226+
180.0000
183227
{% endhighlight %}
184228
<p>This option is available for many other functions involving crystal directions and crystal orientations.</p>
185-
<h2 id="15">Calculations</h2>
229+
<h2 id="16">Calculations</h2>
186230
<p>Essentially all the operations defined for general directions, i.e. for variables of type <a href="vector3d.vector3d.html"><code class="language-plaintext highlighter-rouge">vector3d</code></a> are also available for Miller indices. In addition Miller indices interact with crystal orientations. Consider the crystal orientation</p>
187231
{% highlight matlab %}
188232
ori = orientation.byEuler(10*degree,20*degree,30*degree,cs)
233+
234+
close all
235+
plot(ori * pattern,'resolution',0.25*degree,'complete','upper')
236+
mtexColorMap black2white
189237
{% endhighlight %}
190238

191239
{% highlight plaintext %}
192-
ori = orientation (Quartz → y←↑x)
240+
ori = orientation (alpha-quartz low → y←↑x)
193241

194242
Bunge Euler angles in degree
195243
phi1 Phi phi2
196244
10 20 30
197245
{% endhighlight %}
246+
<center>
247+
{% include inline_image.html file="CrystalOperations_07.png" %}
248+
</center>
198249
<p>Then one can apply it to a crystal direction to find its coordinates with respect to the specimen coordinate system</p>
199250
{% highlight matlab %}
200-
ori * m1
251+
ori * d1
252+
253+
hold on
254+
plot(ori*d1,'marker','s','MarkerFaceColor','lightgreen','label',char(d1,'latex'),'backgroundColor','w')
255+
hold off
201256
{% endhighlight %}
202257

203258
{% highlight plaintext %}
204259
ans = vector3d (y↑→x)
205-
x y z
206-
0.219491 -0.0733607 -0.0401679
260+
x y z
261+
-0.427085 -0.0286108 0.592032
207262
{% endhighlight %}
263+
<center>
264+
{% include inline_image.html file="CrystalOperations_08.png" %}
265+
</center>
208266
<p>By applying a <a href="crystalSymmetry.crystalSymmetry.html">crystal symmetry</a> one obtains the coordinates with respect to the specimen coordinate system of all crystallographically equivalent specimen directions.</p>
209267
{% highlight matlab %}
210-
p = ori * symmetrise(m1);
211-
plot(p,'grid')
212-
213-
%
214-
% The above plot is essentially the pole figure representation of the
215-
% orientation |ori|.
216-
%
268+
hold on
269+
plot(ori*d1.symmetrise ,'marker','s','MarkerFaceColor','lightgreen','label',char(d1,'latex'),'backgroundColor','w')
270+
hold off
217271
{% endhighlight %}
218272
<center>
219-
{% include inline_image.html file="CrystalOperations_03.png" %}
273+
{% include inline_image.html file="CrystalOperations_09.png" %}
220274
</center>
221-
<h2 id="18">Conversions</h2>
275+
<p>The above plot is essentially the pole figure representation of the orientation <code class="language-plaintext highlighter-rouge">ori</code>.</p>
276+
<h2 id="20">Conversions</h2>
222277
<p>Converting a crystal direction which is represented by its coordinates with respect to the crystal coordinate system \(a\), \(b\), \(c\) into a representation with respect to the associated Euclidean coordinate system is done by the command <a href="Miller.vector3d.html"><code class="language-plaintext highlighter-rouge">vector3d</code></a>.</p>
223278
{% highlight matlab %}
224-
vector3d(m1)
279+
vector3d(d1)
225280
{% endhighlight %}
226281

227282
{% highlight plaintext %}
228283
ans = vector3d (y↑→x)
229-
x y z
230-
0.117443 -0.203417 0
284+
x y z
285+
-0.2457 0.425565 0.5406
231286
{% endhighlight %}
232287
<p>Conversion into spherical coordinates requires the function <a href="vector3d.polar.html"><code class="language-plaintext highlighter-rouge">polar</code></a>
233288
</p>
234289
{% highlight matlab %}
235-
[theta,rho] = polar(m1)
290+
[theta,rho] = polar(d1)
236291
{% endhighlight %}
237292

238293
{% highlight plaintext %}
239294
theta =
240-
1.5708
295+
0.7378
241296
rho =
242-
5.2360
297+
2.0944
243298
{% endhighlight %}
244299
</div>
245300
</body>

0 commit comments

Comments
 (0)