Agent simulation in Jupyter
py3d is a pure and lightweight Python library dedicated to 3D data structures and functions. It enables batch processing of 3D points, lines, planes, and 3D meshes. Moreover, it provides interactive visualization capabilities for these elements. It is advisable to use it in Jupyter for visualization purposes.
pip install py3d
Here are some small examples:
import py3d
pcd = py3d.read_pcd("binary.pcd")
print("min", pcd.min())
print("max", pcd.max())
pcd.xyz.as_point(colormap=pcd.w)
import py3d
py3d.image("./20220917214012.jpg")
import py3d
py3d.render(
py3d.image("797.jpg") @ py3d.Transform.from_translation([0, 100, 0]),
py3d.image("971.jpg") @ py3d.Transform.from_rpy([0, 0.9, 0.2]) @ py3d.Transform.from_translation([-1000, 500, 0])
)
import py3d
py3d.Transform.from_euler("xyz", [0.4, -0.2, 0])
import py3d
py3d.Vector([
[1,2,3],
[4,5,6],
[7,8,9]
]).as_image()