I am working on object orientation and movement tracking and I need a way to visualize that data. For this I would like to graph the 3-axes arrows of the object frame in some kind of interactive 3D plot that would represent the world frame. Ideally, that visualization would be:
interactive: so I can use the mouse to rotate, zoom, move the 3D view
animated: so I can watch how the 3-axes arrows move over time, optionally leaving a trace over regular intervals
Ideally it could look somewhat like this (which I think is from Matlab):
Could anyone point me to plotting/visualization packages which may be best suited for that job, especially if the visualization should happen in a jupyter notebook or in jupyter lab?
Alternately, does anyone know free open source visualization software (which should run on Linux) which could be used for this separate from Python, e.g. by Python creating the necessary file and then the software doing the interactive visualization?
If you scroll a bit towards the bottom, there are options for 3D plotting. If you scroll even further,
there are options for adding animation to your plots.
Here is a simple example:
import plotly.graph_objs as go
import numpy as np
z = np.linspace(0, 10, 50)
x = np.cos(z)
y = np.sin(z)
trace = go.Scatter3d(x = x, y = y, z = z, mode = 'markers')
marker = dict(size = 12, color = z, colorscale = 'Viridis')
layout = go.Layout(title = '3D Scatter plot')
fig = go.Figure(data = [trace], layout = layout)
fig.show()
Thank you, this is a nice library for visualizing 3D scatter plots, but how would one visualize the axis-crosses in order to indicate 3D orientation?
Here is an example that is perhaps better illustrating what is needed:
As you can see, this shows the orientation at different point by drawing the 3 unit vectors of the object frame coordinate system (red, green, blue). In other words, for each time step, I can see where the object is located in 3D space but also which orientation the object has.
Is it possible to draw such an object with an arbitrary orientation into the 3D coordinate system with Plotly?
Of not, what other library would allow me to do that?
Thank you, those cones are sure useful for indicating such flow directions, but for orientation I would need the kind of “axis” object (with 3 orthogonal line segments) as shown in the example image and after looking around in Plotly, it do not think they have a trace type for that. I could not even find a way to plot line segments so I could manually implement those “axis” objects by having multiple traces. Not sure if I am missing something here, but to me it looks as if plotly would not be able to do this?
Thank you! I did not know of that tool, from a first glance it looks as if it should allow to manually draw those orientation axes into the 3D scene, I will have a closer look!