Abstract. Thermal environment is especially important to ectotherm because a lot of physiological functions rely on the body temperature such as thermoregulation. The so-called behavioural thermoregulation function made use of the heterogeneity of the thermal properties within an individual's habitat to sustain the animal's physiological processes. This function links the spatial utilization and distribution of individual ectotherm with the thermal properties of habitat (thermal habitat). In this study we modelled the relationship between the two by a spatial explicit model that simulates the movements of a lizard in a controlled environment. The model incorporates a lizard's transient body temperatures with a cellular automaton algorithm as a way to link the physiology knowledge of the animal with the spatial utilization of its microhabitat. On a larger spatial scale, 'thermal roughness' of the habitat was defined and used to predict the habitat occupancy of the target species. The results showed the habitat occupancy can be modelled by the cellular automaton based algorithm at a smaller scale, and can be modelled by the thermal roughness index at a larger scale.