class representing two dimensional grains
Syntax
grains = grain2d(V, poly, ori, CSList, phaseId, phaseMap, 'id', idList)
Input
V | n x 3 list of vertices |
poly | cell array of the polyhedrons |
ori | array of mean orientations |
CSList | cell array of symmetries |
phaseId | list of phaseId for each grain |
phaseMap | |
idList | option to provide grain ids |
Class Properties
phaseId | phase identifier of each grain |
id | id of each grain |
poly | cell list of the vertex ids of each grain (index to V) |
V | list of vertices (x,y coordinates) |
boundary | grainBoundary |
innerBoundary | grainBoundary |
triplePoints | @triplePoints |
grainSize | number if pixels belonging to the grain |
GOS | grain orientation spread |
meanOrientation | average grain orientation (only single phase) |
Example
V = [0 0; 1 0; 2 0; 0 1; 1 1; 2 1];
poly = {[1 2 5 4 1];[2 3 6 5 2]};
rot = rotation.rand(2,1);
grains = grain2d(V,poly,rot,crystalSymmetry.load('quartz'))
plot(grains,grains.meanOrientation)
grains = grain2d
Phase Grains Pixels Mineral Symmetry Crystal reference frame
1 2 2 Quartz 321 X||a*, Y||b, Z||c*
boundary segments: 7 (7 µm)
inner boundary segments: 0 (0 µm)
triple points: 0
Id Phase Pixels meanRotation
1 1 1 (181.5°,75.8°,190.1°)
2 1 1 (31°,37.1°,215.1°)

See also
GrainReconstruction GrainSpatialPlots SelectingGrains ShapeParameter