Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draw line given 3d points #113

Open
arjung128 opened this issue Apr 6, 2022 · 1 comment
Open

Draw line given 3d points #113

arjung128 opened this issue Apr 6, 2022 · 1 comment

Comments

@arjung128
Copy link

Hi, is it possible to draw a line connecting a sequence of 3d points? Thanks!

@kielnino
Copy link

kielnino commented Mar 1, 2023

I use normally something like this:

import meshcat
import meshcat.geometry as g

points = [List of 3d points]
color = 0xffffff

vis = meshcat.Visualizer()

l = g.Line(
    geometry=g.PointsGeometry(position=np.array(points).astype(np.float32).T),
    material=g.LineBasicMaterial(color=color)
)
vis.set_object(geometry=l)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants