Questions tagged [lattices]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
14 votes
1 answer
952 views

Can a LatticeData image be displayed in a space filled fashion

I'd like a FaceCenteredCubic image as in the in LatticeData docs, but space packed, and cropped on all the boundaries, so that it illustrates the geometry of the calculation that leads to the $\pi/\...
Peeter Joot's user avatar
  • 6,398
23 votes
4 answers
16k views

How to create an hexagonal lattice structure

Given an array of atoms A-B-A-B-A-B in an hexagonal pattern, how can I use Mathematica to create with an hexagonal lattice (infinite) with this array so each atom A is sorrounded only by B atoms and ...
Jose Javier Garcia's user avatar
11 votes
3 answers
1k views

Creating a Hexagonal Lattice with VoronoiMesh

I want to create a hexagonal lattice using VoronoiMesh. One can achieve that with the following code, where L=5, ...
sam wolfe's user avatar
  • 4,663
8 votes
4 answers
2k views

Drawing a trihexagonal tiling

I am trying to draw a trihexagonal tiling of the following form using Mathematica. I attempted to begin by using the result given in this Stack Overflow Q & A. However, I couldn't figure out how ...
combustion1925's user avatar
9 votes
1 answer
465 views

Generating a Periodic Voronoi Mesh

Consider the following hexagonal mesh, created from VoronoiMesh ...
sam wolfe's user avatar
  • 4,663
1 vote
1 answer
800 views

Using LatticeData to fill a space with spheres in a face-centered cubic (fcc) lattice packing arrangement

I have a large sphere of radius $R_1$ which I would like to pack with $N$ smaller radius of radius $r_2<R_1$ arranged in a face-centered cubic (fcc) packing arrangement (i.e. Kepler's optimal ...
CPP's user avatar
  • 13
0 votes
1 answer
642 views

Mathematica Lattice Reduce Command

I'm going through a very old copy of "Mathematica: A System for Doing Mathematics by Computer" for self practice. I'm on chapter 3, and ran into the LatticeReduce ...
user22233's user avatar
12 votes
3 answers
503 views

How to generate grid points on boundary of $[-1,1]^d$ for arbitrary dimension $d$ and specified resolution?

This must be a trivial thing, but I was not able to find a function for it in Mathematica. How do you efficiently create a grid with constant but specific resolution $r$ in all directions on the ...
Mauricio Fernández's user avatar
6 votes
2 answers
7k views

How to generate a 3-d simple cubic lattice of length 4 in each dimension?

LatticeData["SimpleCubic", "Image"] The above line gives me a single cube (2 lattice points in each direction). But I want a lattice with 4 lattice points in ...
PyariBilli's user avatar
2 votes
2 answers
297 views

Defining a piecewise function with underlying lattice

I'm fairly new to Mathematica, and programming in general, but I'm trying to define an $n$-dimensional piecewise function, $F({\bf x})$. Properties of the function are set by an underlying lattice, ...
G. Esparza's user avatar
21 votes
2 answers
4k views

How to build a neighbor table for the Hexagonal lattice

I want to consider a collection of vertices arranged in a finite Hexagonal lattice, with say $n_{r}$ rows and $n_{x}$ vertices per row, for a total of $N = n_{x}n_{r}$ vertices. The goal is to ...
miggle's user avatar
  • 657
14 votes
3 answers
402 views

Ordering Problem With VoronoiMesh

Imagine I want to model 2D cells moving in a tissue. Consider, as an example, Lloyd's relaxation algorithm. Using VoronoiMesh I'm able to mimic some cell movement. ...
sam wolfe's user avatar
  • 4,663
12 votes
2 answers
1k views

Arbitrary lattice graph in 2D

My purpose is to generate a graph representing a lattice, where the vertices are essentially the lattice sites. This lattice has to be periodic. That means the opposite boundaries are identical. MWE ...
Shamina's user avatar
  • 633
8 votes
1 answer
497 views

How can I sequentially apply different graph embeddings?

Imagine I have some graph G, and I perform a graph embedding using a command like: ...
Roger Harris's user avatar
  • 1,497
7 votes
1 answer
326 views

construct a lattice with a defined unitcell

We can construct a base-centered tetragonal unit cell by: LatticeData["CenteredTetragonal", "Image"] But how can we construct a lattice by <...
Inzo Babaria's user avatar
  • 1,513
7 votes
3 answers
402 views

Creating MeshRegions of various 2D lattices

This is a soft question about the best approach to design a function that creates MeshRegion objects of various 2D lattices, e.g. kagome or hexagonal, all through ...
Szabolcs's user avatar
  • 235k
6 votes
3 answers
875 views

Drawing a Kagome lattice for given geometry

I came across this question in stack exchange. Modified the answer a bit to get a lattice structure like this. ...
Galilean's user avatar
  • 569
6 votes
2 answers
245 views

Automatically get points in a given triangular lattice and vice versa?

Given a triangular lattice which grows with number n, as follows I want to list all the connected points in the lattice to form the ...
Xuemei's user avatar
  • 1,616
4 votes
1 answer
840 views

Hexagonal lattice points with center points in 2D

I am using the follwing coder from here, answered by Michael E2, to create 2d lattice points, without the center ponts of the cells. ...
lio's user avatar
  • 2,396
4 votes
2 answers
655 views

Minimise discrete function

Let $f\,\colon\,\Lambda\to\mathbb R$ be a real-valued function, where $\Lambda$ is a finite integer lattice. Say, $\Lambda=\mathbb Z_3^n=\{\vec x\,\mid\, x_i=0,1,2\}$ for some $n\in\mathbb N$. I'd ...
AccidentalFourierTransform's user avatar
4 votes
3 answers
255 views

Cell-adjacency Graph of a Square Mesh

Consider the list of points pts = {{1, 1}, {1, 2}, {2, 1}, {2, 2}} I want to use them to define a 2x2 square mesh using ...
sam wolfe's user avatar
  • 4,663
2 votes
1 answer
611 views

Cropping a non-cubic lattice unit cell

I would like to crop the hexagonal close-packed system as a hexagon and not as a cube. I would like to use the following volumetricPlot already given on this ...
user13206's user avatar
2 votes
1 answer
990 views

Finding 111 plane of Carbon Diamond

All, I looked at the example on the Mathematica Website with the Carbon Diamond Lattice. Example I am referring to I am wondering is there a way to highlight an individual plane such as the 111 or ...
user1558881's user avatar
1 vote
1 answer
337 views

Point lattice leading to triangle lattice

My main purpose is to eventually generate a triangle lattice from one original point, let's say the origin. So I want to start with the origin and generate 6 points around it, which are the vertices ...
user65572's user avatar