In this post I show how one can script-generate a square lattice with buckling. By scripting it there's memory of each vertex's identity which can be used later to animate certain behaviors.

When scripting it's easy to keep track of vertices and faces and/or edges in a rectangular lattice, but I haven't been able to write a similar script for a buckled1 honeycomb lattice.

Question: What is a good strategy for script-generating a buckled honeycomb lattice mesh (hex faces) for animating 2D materials? I'll have atoms at the vertices and bonds along the edges. There may be tutorials how to draw them, but I need to generate and then later animate these in a scripted way.

1vertices alternate up and down out of plane. This works easily when there is an even number of vertices in each face (e.g. 4 or 6)

buckled silicene buckled silicene


In the future I will have to add defects by scripted deletion or addition of single vertices to the honeycomb and then animating how these defects move around through the honeycomb as well.

silicene Source from here.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.