0

I'm busy building a simple physics engine as a school project and I'm struggling to actually plot the coordinates for the vertices and edges of my 3D shapes. How can I use matplot/pyplot to achieve this with simple coordinates?

This is for Python 3.7 and I've tried using this library many times but the only lines I see are sine curves which is somehow already a line without xyz input.

This is the type of data I have:

 [[0,0,0],[1,1,1],[1,0,0],[0,1,1],[0,1,0],[1,0,1],[0,0,1],[1,1,0]]

I'd love to be able to plot 3D shapes like this that can move around in the same simulation. Any suggestions?

Grud Grud
  • 25
  • 3
  • Possible duplicate of [Python & Matplotlib: Make 3D plot interactive in Jupyter Notebook](https://stackoverflow.com/questions/38364435/python-matplotlib-make-3d-plot-interactive-in-jupyter-notebook) – Szymon Maszke Feb 16 '19 at 11:14
  • What you have is not really a 3D shape. It's a collection of points. Cou can plot points via `scatter`. You can plot Polygons via a `Poly3DCollection` but for that you need to group your points into lists of vertices for each face. – ImportanceOfBeingErnest Feb 16 '19 at 11:40

0 Answers0