stla_io, a MATLAB code which includes routines to read or write the 3D graphics information stored in an ASCII STL (stereolithography) file.

Especially if you are reading large ASCII STL files, you might want to consider the STLA_SIZE_FAST and STLA_READ_FAST routines, provided by Bill Seufzer of NASA Langley. These will run more quickly in MATLAB than the routines STLA_SIZE and STLA_READ.


The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.


stla_io is available in a C++ version and a FORTRAN90 version and a MATLAB version.

Related Data and Programs:

stla, a data directory which contains some examples of ASCII STL files.

stla_display, a MATLAB code which can read an ASCII STL file and display it on the screen.


stla_to_tri_surface, a MATLAB code which reads an ASCII STL file and extracts the surface mesh data as a TRI_SURFACE dataset.

tri_surface_to_stla, a MATLAB code which reads a TRI_SURFACE dataset and extracts the surface mesh data as an ASCII STL file.


  1. 3D Systems, Inc,
    Stereolithography Interface Specification,
    October 1989.

Source Code:

Last revised on 22 March 2019.