import k3d
import k3d.platonic as platonic
import math
import numpy as np
def test(plot):
colors = [0xff0000, 0x00ff00, 0x0000ff, 0xffff00, 0xff00ff]
for j in range(5):
meshes = [
platonic.Dodecahedron().mesh,
platonic.Cube().mesh,
platonic.Icosahedron().mesh,
platonic.Octahedron().mesh,
platonic.Tetrahedron().mesh
]
for i, obj in enumerate(meshes):
rad = math.radians(i / len(meshes) * 360)
radius = 3.5
obj.transform.translation = [math.sin(rad) * radius, math.cos(rad) * radius, 2*j]
obj.color = colors[i]
plot += obj
plot.render()