import k3d
import numpy as np
position1 = [0.5, 1.0, 0.0]
position2 = [-0.5, -1.0, 0.0]
plot = k3d.plot()
plot += k3d.texture_text('K3D Jupyter', position1, color=0xff0000, font_face='Arial', font_weight=300, size=2.0)
plot += k3d.texture_text('K3D Jupyter', position2, color=0xff0000, font_face='Arial', font_weight=700, size=1.0)
plot.display()
# Multipile texts in single object
N = 20
positions = np.random.randn(N,3).astype(np.float32)
plot2 = k3d.plot()
obj = k3d.texture_text(["lorem ipsum"] * N, positions, is_html=True)
plot2 += obj
plot2.display()
obj.text = list(map(lambda a: str(a), list(range(N))))
obj.position = np.random.randn(N,3).astype(np.float32)