#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Aug 26 20:36:53 2024

@author: sam
"""

import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D

x = np.linspace(-2,2)
y = np.linspace(-1,1)
X,Y = np.meshgrid(x,y)

def f(x,y):
    return (x-1)**2 + y**2

fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
surf = ax.plot_surface(X,Y,f(X,Y))