The program has been exhaustively explained in the journal publication:
K. Liu and A. Tovar, "An efficient 3D topology optimization code written in Matlab", Struct Multidisc Optim, 50(6): 1175-1196, 2014, doi:10.1007/s00158-014-1107-x
Take Top3d results for 3D printing using Top3dSTL!
Top3dSTL_v3.m (10 kB) is a simple STL writter for Top3d topologies. Options such as binary or ascii format, cubic or isosurfce reresentation are available.