This repository provides the data and R codes that simulate the self-organized crack patterns on our manuscript. "Physical self-organization kick-starts ecosystem development" by Kang Zhang#, Jiaguo Yan#, Qiang He, Chi Xu*, Johan van de Koppel, Bo Wang, Baoshan Cui*, and Quan-Xing Liu.