Add C interface for lattice creation