CDL Examples
Ready-to-use CDL expressions for common gemstones, minerals, and crystal habits. Click any example to open it in the Playground.
Basic Crystals
Single-form crystal habits using Miller indices or named forms.
Diamond Octahedron
Classic octahedral habit
cubic[m3m]:{111} Fluorite Cube
Perfect cubic habit
cubic[m3m]:{100} Garnet Dodecahedron
Rhombic dodecahedron
cubic[m3m]:{110} Garnet Trapezohedron
Icositetrahedron habit
cubic[m3m]:{211} Hexagonal Prism
Basic hexagonal prism (beryl, apatite)
hexagonal[6/mmm]:{10-10} Calcite Rhomb
Rhombohedral cleavage form
trigonal[-3m]:{10-11} Pyritohedron
Pentagonal dodecahedron (pyrite)
cubic[m-3]:{210} Ruby Tabular
Tabular habit with dipyramid and pinacoid
trigonal[-3m]:{10-11}@1.0 + {0001}@0.4 Multi-form Combinations
Crystals with multiple forms combined using the + operator.
Diamond (Octahedron + Dodecahedron)
Octahedron with minor dodecahedron truncation
cubic[m3m]:{111}@1.0 + {110}@0.2 Fluorite Cuboctahedron
Equal cube and octahedron development
cubic[m3m]:{100}@1.0 + {111}@1.0 Garnet Combination
Dodecahedron with trapezohedron
cubic[m3m]:{110}@1.0 + {211}@0.6 Beryl Hexagonal Prism
Prism with basal pinacoid
hexagonal[6/mmm]:{10-10}@1.0 + {0001}@1.0 Beryl Tabular
Tabular habit with dominant pinacoid
hexagonal[6/mmm]:{0001}@1.0 + {10-10}@0.6 + {11-20}@0.2 Quartz (Short Prismatic)
Short prism with rhombohedral terminations
trigonal[32]:{10-10}@0.4 + {10-11}@1.2 + {01-11}@1.0 Tourmaline Prismatic
Hemimorphic prismatic habit
trigonal[3m]:{10-10}@1.0 + {10-11}@0.8 Zircon
Tetragonal bipyramid with prism
tetragonal[4/mmm]:{110}@1.0 + {101}@0.9 + {100}@1.3 Topaz
Orthorhombic prismatic habit
orthorhombic[mmm]:{110}@1.0 + {120}@1.1 + {011}@0.9 Chrysoberyl Tabular
Tabular orthorhombic crystals
orthorhombic[mmm]:{110}@1.0 + {010}@0.8 + {111}@0.5 Moonstone
Monoclinic feldspar habit
monoclinic[2/m]:{010}@1.0 + {110}@0.8 + {001}@0.7 + {100}@0.5 Modifications
Crystal shapes modified by elongation, flattening, or tapering.
Quartz (Elongated Prism)
Classic elongated quartz crystal
trigonal[32]:{10-10}@0.5 + {10-11}@1.2 + {01-11}@1.0 | elongate(c:2.0) Sapphire (Barrel-shaped)
Elongated barrel-shaped corundum
trigonal[-3m]:{10-10}@1.0 + {10-11}@0.7 | elongate(c:1.8) Tourmaline (Elongated)
Strongly elongated prismatic tourmaline
trigonal[32]:{10-10}@1.0 + {10-11}@0.8 | elongate(c:2.5) Flattened Tabular
Flattened octahedral crystal
cubic[m3m]:{111} | flatten(a:0.5) Twin Laws
Crystal twinning using the | twin(law) syntax.
Diamond Macle
Flattened triangular spinel-law contact twin
cubic[m3m]:{111}@1.0 + {100}@0.3 | twin(spinel_law) Spinel Macle
Classic spinel law twin
cubic[m3m]:{111}@1.0 + {100}@0.25 | twin(spinel_law) Fluorite Interpenetrating
Two cubes at 60 degree rotation around [111]
cubic[m3m]:{100}@1.0 | twin(fluorite) Fluorite Twin (with Octahedron)
Interpenetrating twin with octahedron modification
cubic[m3m]:{100}@1.0 + {111}@0.8 | twin(fluorite) Quartz Japan Law
Heart-shaped contact twin at ~84.5 degrees
trigonal[32]:{10-10}@0.5 + {10-11}@1.2 + {01-11}@1.0 + {0001}@2.0 | elongate(c:2.0) | twin(japan) Quartz Dauphine
Penetration twin with 180 degree c-axis rotation
trigonal[32]:{10-10}@0.5 + {10-11}@1.2 + {01-11}@1.0 + {0001}@2.0 | elongate(c:2.0) | twin(dauphine) Quartz Brazil Law
Optical twin (left/right hand interpenetration)
trigonal[32]:{10-10}@0.5 + {10-11}@1.2 + {01-11}@1.0 + {0001}@2.0 | elongate(c:2.0) | twin(brazil) Staurolite 90 Degree Cross
Cruciform penetration twin
orthorhombic[mmm]:{110}@1.0 + {010}@0.7 + {001}@0.2 | twin(staurolite_90) Staurolite 60 Degree Cross
X-shaped "fairy cross" twin
orthorhombic[mmm]:{110}@1.0 + {010}@0.6 + {001}@0.3 | twin(staurolite_60) Chrysoberyl Trilling
Cyclic pseudohexagonal triplet twin
orthorhombic[mmm]:{1-10}@1.0 + {110}@0.9 + {010}@0.5 + {001}@0.2 | twin(trilling) Features v1.2
Surface markings, growth patterns, and inclusions annotated on forms.
Diamond with Trigons
Octahedron with dense triangular etch pits
cubic[m3m]:{111}@1.0[trigon:dense] + {110}@0.2 Diamond Cube with Etch Pits
Cube faces with square dissolution features
cubic[m3m]:{100}[etch_pit:square] Quartz with Striations
Prism faces with horizontal growth lines
trigonal[32]:{10-10}@0.5[striation:horizontal] + {10-11}@1.2 + {01-11}@1.0 | elongate(c:2.0) Sapphire with Silk
Barrel-shaped with horizontal striations
trigonal[-3m]:{10-10}@1.0[striation:horizontal] + {10-11}@0.7 | elongate(c:1.8) Tourmaline with Striations
Parallel vertical striations on prism faces
trigonal[32]:{10-10}@1.0[striation:parallel] + {10-11}@0.8 | elongate(c:2.5) Garnet with Curved Striations
Dodecahedral faces with characteristic curved lines
cubic[m3m]:{110}[striation:curved] Watermelon Tourmaline
Colour-zoned pink core with green rim
trigonal[32]:{10-10}@1.0 + {10-11}@0.8 | elongate(c:1.5) Phenomena v1.2
Optical phenomena like asterism, chatoyancy, and adularescence.
Star Sapphire (6-Ray)
Six-rayed star from oriented rutile silk
trigonal[-3m]:{10-11}@1.0 | phenomenon[asterism:6] Star Sapphire (with Silk)
Asterism with silk feature on form
trigonal[-3m]:{10-11}@1.0[silk:dense] | phenomenon[asterism:6] Cat's Eye Chrysoberyl
Sharp chatoyant band from parallel silk
orthorhombic[mmm]:{110}@1.0 | phenomenon[chatoyancy:sharp] Star Sapphire (Strong)
Asterism with intensity parameter
trigonal[-3m]:{10-11} | phenomenon[asterism:6, intensity:strong] Grouping and Labels v1.3
Parenthesized groups for shared features and labeled forms.
Grouped with Shared Feature
Both forms share phantom feature
cubic[m3m]:({111}@1.0 + {100}@1.3)[phantom:3] Group + Standalone Form
Group alongside an ungrouped form
cubic[m3m]:({111} + {100})[phantom:3] + {110}@0.8 Merged Features
Own features merge with group features
cubic[m3m]:({111}[trigon:dense] + {100})[phantom:3] Labeled Forms
Forms labeled as core and rim
cubic[m3m]:core:{111}@1.0 + rim:{100}@1.3 Labeled Group
Named group with shared feature
cubic[m3m]:core:({111} + {100})[phantom:3] Definitions v1.3
Named form definitions for reuse with @name and $reference syntax.
Simple Definition
Define octahedron form, reference with $oct
@oct = {111}@1.0
cubic[m3m]:$oct + {100}@1.3 Quartz Definitions
Named prism and rhombohedron
@prism = {10-10}@1.0
@rhomb = {10-11}@0.8
trigonal[-3m]:$prism + $rhomb Chained Definitions
Definitions referencing other definitions
@a = {111}@1.0
@b = {100}@1.3
@combo = $a + $b
cubic[m3m]:$combo With Doc Comments
Definitions work alongside doc comments
#! Mineral: Diamond
@oct = {111}@1.0
cubic[m3m]:$oct Building Your Own
Combine these patterns to create custom crystal morphologies:
# Start with a base form
cubic[m3m]:{111}@1.0
# Add a modifying form with +
cubic[m3m]:{111}@1.0 + {100}@1.3
# Adjust relative development
# Smaller @scale = more prominent faces
cubic[m3m]:{111}@0.8 + {100}@1.5 # More octahedron
cubic[m3m]:{111}@1.5 + {100}@0.8 # More cube
# Add features to specific forms
cubic[m3m]:{111}@1.0[trigon:dense] + {100}@1.3
# Apply a modification
trigonal[32]:{10-10}@0.5 + {10-11}@1.2 | elongate(c:2.0)
# Add a twin law
cubic[m3m]:{111}@1.0 | twin(spinel_law)
# Annotate a phenomenon
trigonal[-3m]:{10-11}@1.0[silk:dense] | phenomenon[asterism:6]
# Full example with comments, definitions, features, and twin
#! Mineral: Diamond
#! Habit: Macle twin
@oct = {111}@1.0[trigon:sparse]
cubic[m3m]:$oct + {100}@0.3 | twin(spinel_law) Try These Examples
Open the CDL Playground to experiment with these expressions and customize them.
Open Playground