Crystal shape and plotInnerFace #2477
Answered
by
kilir
t1ant12n
asked this question in
Ask Anything
-
|
Hello, I have got a crystal with a specific orientation and I want to highlight the 0001 plane. Here is my code: cS_alpha = crystalShape.hex(ebsd('Ti-Hex').CS);
alpha1 = orientation.byEuler(47.9*degree,95.2*degree,3.3*degree,ebsd('Ti-Hex'));
figure
plot(alpha1*cS_alpha,'FaceAlpha',0.2,'lineWidth',5,'FaceColor','blue')
hold on
arrow3d(0.5*[xvector, yvector, zvector], 'labeled');
view(270,90)
N = Miller(0,0,0,1,'hkl',ebsd('Ti-Hex').CS);
hold on
plotInnerFace(alpha1*cS_alpha, N, 'FaceColor','red','FaceAlpha',0.8, 'EdgeColor', 'k');But I find the highlighted 0001 plane is wrong here. I think the N is not align with the orientation of the crystal. How can I fix it? |
Beta Was this translation helpful? Give feedback.
Answered by
kilir
Dec 3, 2025
Replies: 1 comment 1 reply
-
|
Hi, since you plot a rotated crystal shape, you also need to rotate the plane: plotInnerFace(alpha1*cS_alpha, alpha1*N, 'FaceColor','red','FaceAlpha',0.8, 'EdgeColor', 'k');Hope that helps. Cheers, |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
t1ant12n
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Hi,
since you plot a rotated crystal shape, you also need to rotate the plane:
Hope that helps.
Cheers,
Rüdiger