How do you programmatically create meshes?

I believe this should get you started :