diff --git a/src/Examples/repeating_structure_examples.jl b/src/Examples/repeating_structure_examples.jl index aa30b4cd2..1e7e67a8d 100644 --- a/src/Examples/repeating_structure_examples.jl +++ b/src/Examples/repeating_structure_examples.jl @@ -2,33 +2,29 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # See LICENSE in the project root for full license information. +export drawrectlattice, drawhexneighbors, drawhexregion, drawhexrect, drawhexrectcolors +export hex3cluster, hex3RGB, hexRGBW, hex12RGB +export drawhex3RGB, drawhex12RGB - -############################################################################# drawrectlattice() = Vis.drawcells(Repeat.RectangularBasis(),50.0,SMatrix{2,4,Int64}(0,0,0,1,1,0,1,1)) -export drawrectlattice """draw the 2 ring neighbors of the hex cell at coordinates (0,0)""" drawhexneighbors() = Vis.drawcells(Repeat.HexBasis1(),50,Repeat.neighbors(Repeat.HexBasis1,(0,0),2)) -export drawneighbors """draw hex cell at coordinates (0,0) and the 1 and 2 ring neighbors""" drawhexregion() = Vis.drawcells(Repeat.HexBasis1(),50,Repeat.region(Repeat.HexBasis1,(0,0),2)) -export drawhexregion """draw hex cells that fit within a rectangular box centered at coordinates (0,0). Use fill color yellow.""" function drawhexrect() cells = Repeat.hexcellsinbox(2,2) Vis.drawcells(Repeat.HexBasis1(),50,cells,color = repeat(["yellow"],length(cells))) end -export drawhexrect """draw hex cells that fit within a rectangular box centered at coordinates (0,0). Use random fill colors selected for maximum distinguishability.""" function drawhexrectcolors() cells = Repeat.hexcellsinbox(4,4) Vis.drawcells(Repeat.HexBasis1(),30,cells) end -export drawhexrectcolors """ Create a LatticeCluser with three elements at (0,0),(-1,0),(-1,1) coordinates in the HexBasis1 lattice""" function hex3cluster() @@ -37,7 +33,6 @@ function hex3cluster() clusterbasis = LatticeBasis(( -1,2),(2,-1)) return LatticeCluster(clusterbasis,eltlattice,clusterelts) end -export hex3cluster """ Create a ClusterWithProperties with three types of elements, R,G,B """ function hex3RGB() @@ -50,7 +45,6 @@ function hex3RGB() properties = DataFrame(Color = colors, Name = names) return ClusterWithProperties(lattice,properties) end -export hex3RGB """ Create a ClusterWithProperties with four types of elements, R,G,B,W """ function hexRGBW() @@ -63,7 +57,6 @@ function hexRGBW() properties = DataFrame(Color = colors, Name = names) return ClusterWithProperties(lattice,properties) end -export hexRGBW function hex12RGB() clusterelements = SVector( @@ -93,15 +86,9 @@ function hex12RGB() properties = DataFrame(Color = colors, Name = names) return ClusterWithProperties(lattice,properties) end -export hex12RGB """ draw 3 repeats of hex3RGB cluster """ drawhex3RGB() = Vis.draw(hex3RGB(),[0 1 0; 0 0 1]) -export drawhex3RGB """ draw 3 repeats of hex12RGB cluster """ drawhex12RGB() = Vis.draw(hex12RGB(),[0 1 0; 0 0 1]) -export drawhex12RGB - - -