This study addresses challenges in rural planning amid economic growth and the implementation of rural revitalization policies. The aim is to enhance the integration of cultural and ecological elements in rural areas, combating issues such as the fading village atmosphere and incomplete agricultural chains. The research focuses on optimizing the random forest algorithm to explore innovative approaches to landscape planning and design for rural human settlements. Using the moving window method, the study computes two-dimensional and three-dimensional landscape indices in surrounding villages of Beijing, conducting a multi-scale analysis of the living environment. Power function fitting indicates an optimal window size of approximately 700 meters for studying the relationship between art patterns and three-dimensional landscape patterns in the rural area. The findings offer insights into improving rural living environments through effective landscape planning and design influenced by artistic modes.