Skip to content

alsignoriello/hexagonal_lattice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hexagonal Lattice

Generates a hexagonal flat-topped lattice.

It can be simulated such that there are no boundary conditions or there are periodic boundary conditions.

In 3D, the hexagons assume a z length of 1.

Parameters

Parameter Definition Range
nx number of hexagons in x direction even positive int
ny number of hexagons in y direction positive int
s side length of hexagon defined Area = 1

Running the Code

sh run.sh [nx] [ny]

vertices.txt (x,y) coordinates for every vertex in the lattice

edges.txt (index1, index2) indices for every edge between two vertices in the lattice

hexagons.txt (index0, index1, ... indexN) indices in counter-clockwise order that form every hexagon in the lattice

Requirements

numpy (1.8.1)

matplotlib (1.3.1)

About

Generates a hexagonal lattice

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published