Skip to content

Instantly share code, notes, and snippets.

@wkentaro
Created November 6, 2020 22:50
Show Gist options
  • Save wkentaro/c37df724d32861eea745b57d76227c28 to your computer and use it in GitHub Desktop.
Save wkentaro/c37df724d32861eea745b57d76227c28 to your computer and use it in GitHub Desktop.
import numpy as np
import trimesh
import pickpp
scene = trimesh.Scene()
coord = pickpp.geometry.Coordinate()
axis = trimesh.creation.axis()
axis.apply_transform(coord.matrix)
scene.add_geometry(axis)
coord.translate([0, 0, 1], "world")
axis = trimesh.creation.axis()
axis.apply_transform(coord.matrix)
# scene.add_geometry(axis)
coord.rotate([0, np.deg2rad(30), 0], "world")
axis = trimesh.creation.axis()
axis.apply_transform(coord.matrix)
scene.add_geometry(axis)
coord.rotate([np.deg2rad(30), 0, 0], "world")
axis = trimesh.creation.axis()
axis.apply_transform(coord.matrix)
scene.add_geometry(axis)
scene.show(resolution=(1280, 960))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment