#!/usr/bin/python3
import numpy as np
import math
import matplotlib.pyplot as plt
import mpl_toolkits.mplot3d as Axes3D

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


fig = plt.figure()
ax = fig.add_subplot(111,projection='3d')

xn = np.array([-2,-1])
pn = np.array([1,0])
x = np.linspace(-2,2,100)
y = np.linspace(-2,2,100)
X,Y = np.meshgrid(x,y)


h=0.2
for i in range(0,20):
    x = xn+i*h*pn
    ax.plot(x[0],x[1],f(x[0],x[1]),'ro')



plt.show()
