Files
LPP/examples/movie_melt.py
danielque 539fd060c2 python 3 compatibility for examples/*.py files
add from __future__ import
print statement -> print() function
xrange -> range
map() -> list(map())
range() -> list(range())
StandardError -> Exception
2023-08-10 13:25:36 +02:00

21 lines
378 B
Python

# movie of melting LJ solid
a = dump("files/dump.melt")
a.tselect.test("$t == 0")
a.scale()
a.set("$ix = int($x * 4)")
a.set("$iy = int($y * 4)")
a.set("$iz = int($z * 4)")
a.set("$type = ($ix + $iy + $iz) % 2 + 1")
a.unscale()
a.tselect.all()
a.clone(0,"type")
r = raster(a)
r.acol([1,2],["red","green"])
r.arad([1,2],0.5)
r.file = "melt"
r.pan(130,25,1,60,135,0.6)
r.all()