In everyday life, three-dimensional shapes are ubiquitous, manifesting in structures such as houses, bottles, and vehicles. These shapes, characterized by length, width, and height, represent the application of functions of two variables, particularly within spatial domains. This research employs Python programming to model functions of two variables, specifically focusing on spatial surfaces. Leveraging the Matplotlib module, graphical representations of these functions are generated, while the NumPy module facilitates mathematical analyses, including identifying extremal values, critical points, and tangent lines. Results demonstrate the efficacy of Python in efficiently modeling functions of two variables. Through this approach, readers gain insights into the inherent characteristics and behaviors of such functions within spatial contexts, thereby simplifying mathematical analyses and enhancing comprehension.