system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5 How are 3D shapes described in 3D files

I am working on a program to render 3D shapes with perspective using python and I would like to know how standard 3D formats "describe" shapes like how all the points and faces are notated. Thank you!
gpt
.obj files tend to be the easiest to understand since they can be opened in a notepad to mess with. First they state a list of points and their order matters. Then it gives a list of triangles (sometimes larger n-gon) by writing a list of numbers refrencing points to form sides so each side is a list of points. An octahedron looks like:

V 1 0 0

V 0 1 0

V 0 0 1

V -1 0 0

V 0 -1 0

V 0 0 -1


F 1 2 3

F 1 2 6

F 1 5 3

F 1 5 6

F 4 2 3

F 4 2 6

F 4 5 3

F 4 5 6

V stands for vertex and f stands for face. Notice that the verteces count from 1 because  the 0 vertex is reserved for the center or point of revolution. This is a close aproximation to a .obj file and would not be opened by your favorite 3d viewer.