SUBREDDIT: r/AskReddit
TITLE: How can I read/write a 3D modeling .obj file?
POST: I'm building a three-dimensional scanner for my senior undergraduate project. I am writing software that calculates all of the vertices x,y,z coordinates and keeps track of all edges. I've also exported a current face model I had made to .obj and opened it in a text editor. It looks very simple, but I can't find a clear explanation of exactly what everything means. 

It appears to be something along the lines of:
v x y z
...
...
# 2166 vertices

g Face
f # # # # (I don't know what these numbers represent)
# 2118 polygons - 6 triangles

Anyway, if someone could explain this to me, it would greatly help my project.
TL;DR: 
How do you write a .obj file with a text editor if you know the x,y,z coordinates of your vertices and which vertices are attached by edges?