Skip to content

Commit

Permalink
graphene bilayer rotation
Browse files Browse the repository at this point in the history
  • Loading branch information
g-ar committed Nov 11, 2017
1 parent d31a268 commit 4283225
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions v3/moire_graphene.cfdg
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
startshape start

// cfdg moire_graphene.cfdg -s 1080 -a 10x25 -o ta%f.png
// ffmpeg -r 15 -i ./ta%3d.png -c:v libx264 out.mp4

CF::Time = [time 0 360]
CF::Background =[b 1]
CF::Size = [s 90]
CF::Impure = 1

shape graphene {
clone CF::Dihedral, 6 {
CIRCLE[x 2.5 s 1]
}
}

shape moire {
loop 8 [x 7.5]
loop 14 [y 4.35]
graphene[]
}

shape start {
xs = 26
ys = xs
moire[x -xs y -ys hue 0 sat 1 b 1 time 0 360]
xs = xs*(cos(ftime()) - sin(ftime()))
ys = ys*(sin(ftime()) + cos(ftime()))
moire[x -xs y -ys r ftime() hue 240 sat 1 b 1 time 0 360 z 1]
}

0 comments on commit 4283225

Please sign in to comment.