the faces of 3D grains as a polygon mesh of a scene3d, coloured by grain; what plot(grains) draws for grain3d, MATLAB’s grain3d/plot
Syntax
mesh = grainMesh(grains)
Coloured by phase.
mesh = grainMesh(grains, grains.meanOrientation)
By orientation, the ipf key of the phase.
mesh = grainMesh(grains, grains.volume, colormap='viridis', faceAlpha=0.5)
By a value, translucent.
mesh = grainMesh(grains, faceColor='lightblue', edgeColor='none')
One colour, no edges.
Description
A face of the set of grains is outer when it belongs to one grain and is drawn in that grain’s colour; a face between two of the grains is inner and drawn grey, and only when the faces are translucent, faceAlpha below 1. A grain whose value is NaN is not drawn.
Input
grains |
grain3d, the grains |
Keywords
| keyword | default | description |
|---|---|---|
color |
None |
what colours a grain: None for its phase, an orientation per grain, a value per grain mapped by the colour map, an RGB row per grain, or the name of a property |
faceColor |
None |
one colour for all grains, when color is not given |
faceAlpha |
1.0 |
the opacity of the faces |
edgeColor |
'k' |
the colour of the edges of the faces, ‘none’ for no edges |
edgeAlpha |
1.0 |
the opacity of the edges |
lineWidth |
0.5 |
the width of the edges in points |
colormap |
None |
the colour map for values |
colorRange |
None |
(min, max), the values the colour map spans; by default their range |
ipfDirection |
None |
the specimen direction of the inverse pole figure key for orientations |
Output
mesh |
mesh3d, the faces with a colour each; with a value per grain it keeps the values, the colour map and the range for the colour bar |
See also
boundaryMesh, volumeSlices, scene3d, plot3d, Grains3D, EBSD3Plotting
source
Citing this page.
This page is part of the documentation of
MTEX, a free and open
source MATLAB toolbox for analyzing and modeling crystallographic textures.
It was written by The MTEX Developers and is published at
https://mtex-toolbox.github.io/grainMesh_py.html.
If you use MTEX, or reuse text or figures from this page, in your research,
please cite
F. Bachmann, R. Hielscher, H. Schaeben: Texture Analysis with MTEX - Free and Open Source Software Toolbox, Solid State Phenomena 160 (2010), 63-68. 10.4028/www.scientific.net/SSP.160.63
BibTeX
@article{bachmann2010mtex,
author = {F. Bachmann and R. Hielscher and H. Schaeben},
title = {Texture Analysis with MTEX - Free and Open Source Software Toolbox},
journal = {Solid State Phenomena},
volume = {160},
pages = {63-68},
year = {2010},
doi = {10.4028/www.scientific.net/SSP.160.63},
url = {https://doi.org/10.4028/www.scientific.net/SSP.160.63}
}
Other papers describing specific MTEX methods are listed under Publications — please cite the one that best fits your application. The MTEX source code is licensed under the GNU General Public License v2.0; the text and figures of this documentation are licensed under CC BY 4.0, which permits reuse — including by automated systems — provided The MTEX Developers and this page are credited.