7
$\begingroup$

How can we design the rotational picture of bilayer graphene using Mathematica 7.0 like in the figure? This gives Moire patternenter image description here

$\endgroup$
16
$\begingroup$

Update: I just noticed you wrote Mathematica 7 and CirclePoints was introduced in v10.1. I am updating my code to eliminate it. I think what remains should work in v7; tell me if it does not.

This may need some tuning but it should give you a good start:

segment = Disk[#/2, 1/3] & /@ {{2, 0}, {1, Sqrt[3]}, {-1, Sqrt[3]}, {-2, 0}};

layer = Translate[segment, Join @@ Array[{3 #, 1.76 #2} &, {10, 17}, 0]];

Manipulate[
  Graphics[
    {Blue, layer, Darker@Red, Rotate[layer, -θ]}
    , PlotRange -> {{-7, 35}, {-7, 35}}
    , ImageSize -> 500
  ]
  , {{θ, 0.55}, 0, Pi/2}
]

enter image description here

$\endgroup$
14
$\begingroup$

This solution should work normally on Mathematica 7.

It first generates a hexagonal grid and then removes every third point. Finally two grids are combined in one figure.

I have fine-tuned the parameters to reproduce your figure.

range = Range[1197];
x = Mod[range, 31 + 1/2] 2/Sqrt[3.];
y = Quotient[range, 31 + 1/2] ;
allMeshPoints = Drop[Transpose[{x, y}], {3, -1, 3}];
disks = Map[Disk[#1, 0.35] &, allMeshPoints];

Manipulate[
    Graphics[{EdgeForm[Black], Lighter@Lighter@Blue, disks, Lighter@Red,
        Translate[Rotate[disks, angle], {dx , dy}]}],
    {{dx, 0.055}, 0, 0.3, 0.001},
    {{dy, -0.053}, -0.2, 0, 0.001},
    {{angle, -0.4839}, -1, 1, 0.001}
    ]

graphene

$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.