0

I want to plot the recorded path of an object such as a plane or drone in 3d space using R. The plotted path should be represented by a flat “ribbon” whose orientation perpendicular to the direction of travel changes to reflect the roll of the object. In other words, I want to be able to visualize the path and orientation of the object in one "ribbon" as it banks in turns.

As far as as I can tell, a traditional ribbon plot in R won't allow you to change the orientation in a third dimension.

Matlab and Python have functionality for creating quiver plots where arrows may be placed to indicate the xyz orientation of the object at a given point in time along the path. I cannot find any R packages with similar functionality.

I have played with Plot3D, Plotrgl, Plot3Drgl and cannot find a package that has this capability.

Q1: Are there any packages in R that would support this type of plot?

Q2: If there isn't, how can I go about creating this type of plot R?

Below are examples in Python and Matlab for the 3D quiver type plots, as well as an image demonstrating the ribbon concept I am imagining.

https://medium.com/analytics-vidhya/exploring-data-acquisition-and-trajectory-tracking-with-android-devices-and-python-9fdef38f25ee

Example of 3D quiver plot in python

https://github.com/xioTechnologies/Gait-Tracking-With-x-IMU

Example of 3D quiver plot in matlab

This is an example of what the "ribbon" would look like

Thanks for any help!

Bregma
  • 1
  • If you are making a static graphic, rayrender might be an option: https://www.tylermw.com/pathtracing-neon-landscapes-in-r/ – Jon Spring Mar 19 '22 at 06:04
  • I've looked at rayshader, but not rayrender. I'd prefer a non-static plot. Either way, I think I would need to manually calculate the coordinates for the ribbon width based on the coordinates of the object, it's heading, and the angle of the bank. These are things the python/matlab quiver plots will do automatically, more or less. – Bregma Mar 19 '22 at 17:12

0 Answers0