# -*- coding: utf-8 -*-
"""
Created on Fri Sep  9 09:59:13 2022

@author: Chris
Lab7_Q6
"""


import numpy as np
import matplotlib.pyplot as plt
    
def region(x,y):
    return x**2+y**2<1**2

a,b = -1,1

N = 100

p = a+(b-a)*np.random.uniform(size=[N,2])


xp, yp = p[:,0],p[:,1]

plt.plot(xp,yp,'x')

xr = xp*region(xp,yp)
yr = yp*region(xp,yp)

plt.gca().set_aspect('equal', adjustable='box')


#lt.plot(xr,yr,'or')
