Let Us Play With Carrom Board in Python

Let Us Play With Carrom Board in Python

In this blog we will draw carrom board using matplot library. we will draw like below:

Import libraries

In [1]:
import matplotlib.pyplot as plt
import numpy as np
from numpy import sin, cos, pi, linspace

Draw first point at (0,0)

In [2]:
plt.plot(0, 0, marker = 'o', color = 'black')
plt.show()

Draw another point on the right side from the origin

In [3]:
plt.plot(0, 0, marker = 'o', color = 'black')
plt.plot(1, 0, marker = 'o', color = 'black')

plt.show()

Draw third pont on top of second point

In [4]:
plt.plot(0, 0, marker = 'o', color = 'black')
plt.plot(1, 0, marker = 'o', color = 'black')
plt.plot(1, 1, marker = 'o', color = 'black')
plt.show()

Draw fourth point which is left to the third point

In [5]:
plt.plot(0, 0, marker = 'o', color = 'black')
plt.plot(1, 0, marker = 'o', color = 'black')
plt.plot(1, 1, marker = 'o', color = 'black')
plt.plot(0, 1, marker = 'o', color = 'black')
plt.show()

Connect all four points

In [6]:
plt.plot(0, 0, marker = 'o', color = 'black')
plt.plot(1, 0, marker = 'o', color = 'black')
plt.plot(1, 1, marker = 'o', color = 'black')
plt.plot(0, 1, marker = 'o', color = 'black')

plt.plot(
    [0, 1, 1, 0, 0],
    [0, 0, 1, 1, 0]
)
plt.show()

As we can see, it is not looking like square, for that we will set equal aspect.

Set Aspect ratio

Aspect ratio, means the height to width ratio of an image or screen. This parameter can be auto or equal. In the case of auto, it automatically fills the rectangle with data. If equal is used in that case the same scaling from data to plot takes place. When we use aspect=1 or aspect='equal', it will gives us a square.

In [7]:
plt.plot(0, 0, marker = 'o', color = 'black')
plt.plot(1, 0, marker = 'o', color = 'black')
plt.plot(1, 1, marker = 'o', color = 'black')
plt.plot(0, 1, marker = 'o', color = 'black')

plt.plot(
    [0, 1, 1, 0, 0],
    [0, 0, 1, 1, 0]
)

plt.gca().set_aspect('equal', adjustable='box')
plt.show()

Now it is showing in square but figure size is small, let us increase the figure size.

Increase the figure size

In [8]:
plt.figure(figsize=(8,8))

plt.plot(0, 0, marker = 'o', color = 'black')
plt.plot(1, 0, marker = 'o', color = 'black')
plt.plot(1, 1, marker = 'o', color = 'black')
plt.plot(0, 1, marker = 'o', color = 'black')

plt.plot(
    [0, 1, 1, 0, 0],
    [0, 0, 1, 1, 0]
)

plt.gca().set_aspect('equal', adjustable='box')
plt.show()

Create more four points inside four points

Create first point of second line

In [9]:
plt.figure(figsize=(8,8))

plt.plot(0, 0, marker = 'o', color = 'black')
plt.plot(1, 0, marker = 'o', color = 'black')
plt.plot(1, 1, marker = 'o', color = 'black')
plt.plot(0, 1, marker = 'o', color = 'black')

plt.plot(
    [0, 1, 1, 0, 0],
    [0, 0, 1, 1, 0]
)

#first point of second line
plt.plot(0.08, 0.08, marker = 'o', color = 'red')

plt.gca().set_aspect('equal', adjustable='box')
plt.show()

Second point of second line

In [10]:
plt.figure(figsize=(8,8))

plt.plot(0, 0, marker = 'o', color = 'black')
plt.plot(1, 0, marker = 'o', color = 'black')
plt.plot(1, 1, marker = 'o', color = 'black')
plt.plot(0, 1, marker = 'o', color = 'black')

plt.plot(
    [0, 1, 1, 0, 0],
    [0, 0, 1, 1, 0]
)

#first and second point of second line
plt.plot(0.08, 0.08, marker = 'o', color = 'red')
plt.plot(0.92, 0.08, marker = 'o', color = 'red')

plt.gca().set_aspect('equal', adjustable='box')
plt.show()

Third point of second line

In [11]:
plt.figure(figsize=(8,8))

plt.plot(0, 0, marker = 'o', color = 'black')
plt.plot(1, 0, marker = 'o', color = 'black')
plt.plot(1, 1, marker = 'o', color = 'black')
plt.plot(0, 1, marker = 'o', color = 'black')

plt.plot(
    [0, 1, 1, 0, 0],
    [0, 0, 1, 1, 0]
)

#first and second point of second line
plt.plot(0.08, 0.08, marker = 'o', color = 'red')
plt.plot(0.92, 0.08, marker = 'o', color = 'red')
plt.plot(0.92, 0.92, marker = 'o', color = 'red')

plt.gca().set_aspect('equal', adjustable='box')
plt.show()

Fourth point of second line

In [12]:
plt.figure(figsize=(8,8))

plt.plot(0, 0, marker = 'o', color = 'black')
plt.plot(1, 0, marker = 'o', color = 'black')
plt.plot(1, 1, marker = 'o', color = 'black')
plt.plot(0, 1, marker = 'o', color = 'black')

plt.plot(
    [0, 1, 1, 0, 0],
    [0, 0, 1, 1, 0]
)

#first and second point of second line
plt.plot(0.08, 0.08, marker = 'o', color = 'red')
plt.plot(0.92, 0.08, marker = 'o', color = 'red')
plt.plot(0.92, 0.92, marker = 'o', color = 'red')
plt.plot(0.08, 0.92, marker = 'o', color = 'red')

plt.gca().set_aspect('equal', adjustable='box')
plt.show()

Connect all lines

In [13]:
plt.figure(figsize=(8,8))

plt.plot(0, 0, marker = 'o', color = 'black')
plt.plot(1, 0, marker = 'o', color = 'black')
plt.plot(1, 1, marker = 'o', color = 'black')
plt.plot(0, 1, marker = 'o', color = 'black')

plt.plot(
    [0, 1, 1, 0, 0],
    [0, 0, 1, 1, 0]
)

#points of second line
plt.plot(0.08, 0.08, marker = 'o', color = 'red')
plt.plot(0.92, 0.08, marker = 'o', color = 'red')
plt.plot(0.92, 0.92, marker = 'o', color = 'red')
plt.plot(0.08, 0.92, marker = 'o', color = 'red')

plt.plot(
    [0.08, 0.92, 0.92, 0.08, 0.08],
    [0.08, 0.08, 0.92, 0.92, 0.08]
)

plt.gca().set_aspect('equal', adjustable='box')
plt.show()

Create four goals on each corner

In [14]:
plt.figure(figsize=(8,8))

plt.plot(0, 0, marker = 'o', color = 'black')
plt.plot(1, 0, marker = 'o', color = 'black')
plt.plot(1, 1, marker = 'o', color = 'black')
plt.plot(0, 1, marker = 'o', color = 'black')

plt.plot(
    [0, 1, 1, 0, 0],
    [0, 0, 1, 1, 0]
)

#points of second line
plt.plot(0.08, 0.08, marker = 'o', color = 'red')
plt.plot(0.92, 0.08, marker = 'o', color = 'red')
plt.plot(0.92, 0.92, marker = 'o', color = 'red')
plt.plot(0.08, 0.92, marker = 'o', color = 'red')

plt.plot(
    [0.08, 0.92, 0.92, 0.08, 0.08],
    [0.08, 0.08, 0.92, 0.92, 0.08]
)

#create four goals on each corner
plt.plot(0.13, 0.13, marker = 'o', markersize = 30, color = 'black')
plt.plot(0.87, 0.13, marker = 'o', markersize = 30, color = 'black')
plt.plot(0.87, 0.87, marker = 'o', markersize = 30, color = 'black')
plt.plot(0.13, 0.87, marker = 'o', markersize = 30, color = 'black')

plt.gca().set_aspect('equal', adjustable='box')
plt.show()

Draw point and circle in the middle for coins

In [15]:
plt.figure(figsize=(8,8))

plt.plot(0, 0, marker = 'o', color = 'black')
plt.plot(1, 0, marker = 'o', color = 'black')
plt.plot(1, 1, marker = 'o', color = 'black')
plt.plot(0, 1, marker = 'o', color = 'black')

plt.plot(
    [0, 1, 1, 0, 0],
    [0, 0, 1, 1, 0]
)

#points of second line
plt.plot(0.08, 0.08, marker = 'o', color = 'red')
plt.plot(0.92, 0.08, marker = 'o', color = 'red')
plt.plot(0.92, 0.92, marker = 'o', color = 'red')
plt.plot(0.08, 0.92, marker = 'o', color = 'red')

plt.plot(
    [0.08, 0.92, 0.92, 0.08, 0.08],
    [0.08, 0.08, 0.92, 0.92, 0.08]
)

#create four goals on each corner
plt.plot(0.13, 0.13, marker = 'o', markersize = 30, color = 'black')
plt.plot(0.87, 0.13, marker = 'o', markersize = 30, color = 'black')
plt.plot(0.87, 0.87, marker = 'o', markersize = 30, color = 'black')
plt.plot(0.13, 0.87, marker = 'o', markersize = 30, color = 'black')

#create point in the middle
plt.plot(0.5, 0.5, marker = 'o', markersize = 10, color = 'red')

#create round circle
angles = np.linspace(0, 2 * pi, 100)
r = 0.1
xs = r * cos(angles)
ys = r * sin(angles)
plt.plot(xs + 0.5, ys + 0.5, color = 'grey')


plt.gca().set_aspect('equal', adjustable='box')
plt.show()

Design pattern on the board

First design (circle and line) on the left bottom

In [16]:
plt.figure(figsize=(8,8))

plt.plot(0, 0, marker = 'o', color = 'black')
plt.plot(1, 0, marker = 'o', color = 'black')
plt.plot(1, 1, marker = 'o', color = 'black')
plt.plot(0, 1, marker = 'o', color = 'black')

plt.plot(
    [0, 1, 1, 0, 0],
    [0, 0, 1, 1, 0]
)

#points of second line
plt.plot(0.08, 0.08, marker = 'o', color = 'red')
plt.plot(0.92, 0.08, marker = 'o', color = 'red')
plt.plot(0.92, 0.92, marker = 'o', color = 'red')
plt.plot(0.08, 0.92, marker = 'o', color = 'red')

plt.plot(
    [0.08, 0.92, 0.92, 0.08, 0.08],
    [0.08, 0.08, 0.92, 0.92, 0.08]
)

#create four goals on each corner
plt.plot(0.13, 0.13, marker = 'o', markersize = 30, color = 'black')
plt.plot(0.87, 0.13, marker = 'o', markersize = 30, color = 'black')
plt.plot(0.87, 0.87, marker = 'o', markersize = 30, color = 'black')
plt.plot(0.13, 0.87, marker = 'o', markersize = 30, color = 'black')

#create point in the middle
plt.plot(0.5, 0.5, marker = 'o', markersize = 10, color = 'red')

#create round circle
angles = np.linspace(0, 2 * pi, 100)
r = 0.1
xs = r * cos(angles)
ys = r * sin(angles)
plt.plot(xs + 0.5, ys + 0.5, color = 'grey')


## draw line on left bottom from middle to nearly goal
plt.plot(
    [0.38, 0.18],
    [0.38, 0.18],
    color = 'grey'
)

#create round circle
small_angles_1 = np.linspace(6/8 * 2 * pi, 12/8 * 2 * pi, 100)
r1 = 0.05
xs = r1 * cos(small_angles_1)
ys = r1 * sin(small_angles_1)
plt.plot(xs + 0.35, ys + 0.35, color = 'grey')

#points on the circle
x1 = r1 * cos(pi) + 0.35
y1 = r1 * sin( pi) + 0.35
plt.plot(x1, y1, color = 'grey', marker = 'o', markersize = 5)

x2 = r1 * cos(6/8 * 2 * pi) + 0.35
y2 = r1 * sin( 6/8 * 2 * pi) + 0.35
plt.plot(x2, y2, color = 'grey', marker = 'o', markersize = 5)


plt.gca().set_aspect('equal', adjustable='box')
plt.show()

Second circle and line on the right side

In [17]:
plt.figure(figsize=(8,8))

plt.plot(0, 0, marker = 'o', color = 'black')
plt.plot(1, 0, marker = 'o', color = 'black')
plt.plot(1, 1, marker = 'o', color = 'black')
plt.plot(0, 1, marker = 'o', color = 'black')

plt.plot(
    [0, 1, 1, 0, 0],
    [0, 0, 1, 1, 0]
)

#points of second line
plt.plot(0.08, 0.08, marker = 'o', color = 'red')
plt.plot(0.92, 0.08, marker = 'o', color = 'red')
plt.plot(0.92, 0.92, marker = 'o', color = 'red')
plt.plot(0.08, 0.92, marker = 'o', color = 'red')

plt.plot(
    [0.08, 0.92, 0.92, 0.08, 0.08],
    [0.08, 0.08, 0.92, 0.92, 0.08]
)

#create four goals on each corner
plt.plot(0.13, 0.13, marker = 'o', markersize = 30, color = 'black')
plt.plot(0.87, 0.13, marker = 'o', markersize = 30, color = 'black')
plt.plot(0.87, 0.87, marker = 'o', markersize = 30, color = 'black')
plt.plot(0.13, 0.87, marker = 'o', markersize = 30, color = 'black')

#create point in the middle
plt.plot(0.5, 0.5, marker = 'o', markersize = 10, color = 'red')

#create round circle
angles = np.linspace(0, 2 * pi, 100)
r = 0.1
xs = r * cos(angles)
ys = r * sin(angles)
plt.plot(xs + 0.5, ys + 0.5, color = 'grey')


## draw line on left bottom from middle to nearly goal
plt.plot(
    [0.38, 0.18],
    [0.38, 0.18],
    color = 'grey'
)


#create round circle
small_angles_1 = np.linspace(6/8 * 2 * pi, 12/8 * 2 * pi, 100)
r1 = 0.05
xs = r1 * cos(small_angles_1)
ys = r1 * sin(small_angles_1)
plt.plot(xs + 0.35, ys + 0.35, color = 'grey')

#points on the left bottom circle
x1 = r1 * cos(pi) + 0.35
y1 = r1 * sin( pi) + 0.35
plt.plot(x1, y1, color = 'grey', marker = 'o', markersize = 5)

x2 = r1 * cos(6/8 * 2 * pi) + 0.35
y2 = r1 * sin( 6/8 * 2 * pi) + 0.35
plt.plot(x2, y2, color = 'grey', marker = 'o', markersize = 5)


## draw line on right bottom from middle to nearly goal
plt.plot(
    [0.62, 0.82],
    [0.38, 0.18],
    color = 'grey'
)

#create round circle on the right side
small_angles_2 = np.linspace( 2 * pi, 14/8 * 2 * pi, 100)
xs = r1 * cos(small_angles_2)
ys = r1 * sin(small_angles_2)
plt.plot(xs + 0.65, ys + 0.35, color = 'grey')

#points on the left bottom circle
x1 = r1 * cos(2 * pi) + 0.645
y1 = r1 * sin( 2 * pi) + 0.35
plt.plot(x1, y1, color = 'grey', marker = 'o', markersize = 5)

x2 = r1 * cos(14/8 * 2 * pi) + 0.645
y2 = r1 * sin( 14/8 * 2 * pi) + 0.35
plt.plot(x2, y2, color = 'grey', marker = 'o', markersize = 5)



plt.gca().set_aspect('equal', adjustable='box')
plt.show()

Circle and line on left top corner

In [18]:
plt.figure(figsize=(8,8))

plt.plot(0, 0, marker = 'o', color = 'black')
plt.plot(1, 0, marker = 'o', color = 'black')
plt.plot(1, 1, marker = 'o', color = 'black')
plt.plot(0, 1, marker = 'o', color = 'black')

plt.plot(
    [0, 1, 1, 0, 0],
    [0, 0, 1, 1, 0]
)

#points of second line
plt.plot(0.08, 0.08, marker = 'o', color = 'red')
plt.plot(0.92, 0.08, marker = 'o', color = 'red')
plt.plot(0.92, 0.92, marker = 'o', color = 'red')
plt.plot(0.08, 0.92, marker = 'o', color = 'red')

plt.plot(
    [0.08, 0.92, 0.92, 0.08, 0.08],
    [0.08, 0.08, 0.92, 0.92, 0.08]
)

#create four goals on each corner
plt.plot(0.13, 0.13, marker = 'o', markersize = 30, color = 'black')
plt.plot(0.87, 0.13, marker = 'o', markersize = 30, color = 'black')
plt.plot(0.87, 0.87, marker = 'o', markersize = 30, color = 'black')
plt.plot(0.13, 0.87, marker = 'o', markersize = 30, color = 'black')

#create point in the middle
plt.plot(0.5, 0.5, marker = 'o', markersize = 10, color = 'red')

#create round circle
angles = np.linspace(0, 2 * pi, 100)
r = 0.1
xs = r * cos(angles)
ys = r * sin(angles)
plt.plot(xs + 0.5, ys + 0.5, color = 'grey')


## draw line on left bottom from middle to nearly goal
plt.plot(
    [0.38, 0.18],
    [0.38, 0.18],
    color = 'grey'
)


#create round circle
small_angles_1 = np.linspace(6/8 * 2 * pi, 12/8 * 2 * pi, 100)
r1 = 0.05
xs = r1 * cos(small_angles_1)
ys = r1 * sin(small_angles_1)
plt.plot(xs + 0.35, ys + 0.35, color = 'grey')

#points on the left bottom circle
x1 = r1 * cos(pi) + 0.35
y1 = r1 * sin( pi) + 0.35
plt.plot(x1, y1, color = 'grey', marker = 'o', markersize = 5)

x2 = r1 * cos(6/8 * 2 * pi) + 0.35
y2 = r1 * sin( 6/8 * 2 * pi) + 0.35
plt.plot(x2, y2, color = 'grey', marker = 'o', markersize = 5)


## draw line on right bottom from middle to nearly goal
plt.plot(
    [0.62, 0.82],
    [0.38, 0.18],
    color = 'grey'
)

#create round circle on the right side
small_angles_2 = np.linspace( 2 * pi, 14/8 * 2 * pi, 100)
xs = r1 * cos(small_angles_2)
ys = r1 * sin(small_angles_2)
plt.plot(xs + 0.65, ys + 0.35, color = 'grey')

#points on the right bottom circle
x1 = r1 * cos(2 * pi) + 0.645
y1 = r1 * sin( 2 * pi) + 0.35
plt.plot(x1, y1, color = 'grey', marker = 'o', markersize = 5)

x2 = r1 * cos(14/8 * 2 * pi) + 0.645
y2 = r1 * sin( 14/8 * 2 * pi) + 0.35
plt.plot(x2, y2, color = 'grey', marker = 'o', markersize = 5)


## draw line from right top to middle to nearly goal
plt.plot(
    [0.62, 0.82],
    [0.62, 0.82],
    color = 'grey'
)

#create round circle on the right top side
small_angles_3 = np.linspace( pi/ 2, 2 * pi, 100)
xs = r1 * cos(small_angles_3)
ys = r1 * sin(small_angles_3)
plt.plot(xs + 0.65, ys + 0.65, color = 'grey')

#points on the right top circle
x1 = r1 * cos(pi/2) + 0.645
y1 = r1 * sin(pi/2) + 0.65
plt.plot(x1, y1, color = 'grey', marker = 'o', markersize = 5)

x2 = r1 * cos(2 * pi) + 0.645
y2 = r1 * sin(2 * pi) + 0.65
plt.plot(x2, y2, color = 'grey', marker = 'o', markersize = 5)


plt.gca().set_aspect('equal', adjustable='box')
plt.show()

Draw circle and line on left top corner

In [19]:
plt.figure(figsize=(8,8))

plt.plot(0, 0, marker = 'o', color = 'black')
plt.plot(1, 0, marker = 'o', color = 'black')
plt.plot(1, 1, marker = 'o', color = 'black')
plt.plot(0, 1, marker = 'o', color = 'black')

plt.plot(
    [0, 1, 1, 0, 0],
    [0, 0, 1, 1, 0]
)

#points of second line
plt.plot(0.08, 0.08, marker = 'o', color = 'red')
plt.plot(0.92, 0.08, marker = 'o', color = 'red')
plt.plot(0.92, 0.92, marker = 'o', color = 'red')
plt.plot(0.08, 0.92, marker = 'o', color = 'red')

plt.plot(
    [0.08, 0.92, 0.92, 0.08, 0.08],
    [0.08, 0.08, 0.92, 0.92, 0.08]
)

#create four goals on each corner
plt.plot(0.13, 0.13, marker = 'o', markersize = 30, color = 'black')
plt.plot(0.87, 0.13, marker = 'o', markersize = 30, color = 'black')
plt.plot(0.87, 0.87, marker = 'o', markersize = 30, color = 'black')
plt.plot(0.13, 0.87, marker = 'o', markersize = 30, color = 'black')

#create point in the middle
plt.plot(0.5, 0.5, marker = 'o', markersize = 10, color = 'red')

#create round circle
angles = np.linspace(0, 2 * pi, 100)
r = 0.1
xs = r * cos(angles)
ys = r * sin(angles)
plt.plot(xs + 0.5, ys + 0.5, color = 'grey')


## draw line on left bottom from middle to nearly goal
plt.plot(
    [0.38, 0.18],
    [0.38, 0.18],
    color = 'grey'
)

#create round circle
small_angles_1 = np.linspace(6/8 * 2 * pi, 12/8 * 2 * pi, 100)
r1 = 0.05
xs = r1 * cos(small_angles_1)
ys = r1 * sin(small_angles_1)
plt.plot(xs + 0.35, ys + 0.35, color = 'grey')

#points on the left bottom circle
x1 = r1 * cos(pi) + 0.35
y1 = r1 * sin( pi) + 0.35
plt.plot(x1, y1, color = 'grey', marker = 'o', markersize = 5)

x2 = r1 * cos(6/8 * 2 * pi) + 0.35
y2 = r1 * sin( 6/8 * 2 * pi) + 0.35
plt.plot(x2, y2, color = 'grey', marker = 'o', markersize = 5)


## draw line on right bottom from middle to nearly goal
plt.plot(
    [0.62, 0.82],
    [0.38, 0.18],
    color = 'grey'
)

#create round circle on the right side
small_angles_2 = np.linspace( 2 * pi, 14/8 * 2 * pi, 100)
xs = r1 * cos(small_angles_2)
ys = r1 * sin(small_angles_2)
plt.plot(xs + 0.65, ys + 0.35, color = 'grey')

#points on the right bottom circle
x1 = r1 * cos(2 * pi) + 0.645
y1 = r1 * sin( 2 * pi) + 0.35
plt.plot(x1, y1, color = 'grey', marker = 'o', markersize = 5)

x2 = r1 * cos(14/8 * 2 * pi) + 0.645
y2 = r1 * sin( 14/8 * 2 * pi) + 0.35
plt.plot(x2, y2, color = 'grey', marker = 'o', markersize = 5)


## draw line from right top to middle to nearly goal
plt.plot(
    [0.62, 0.82],
    [0.62, 0.82],
    color = 'grey'
)

#create round circle on the right top side
small_angles_3 = np.linspace( pi/ 2, 2 * pi, 100)
xs = r1 * cos(small_angles_3)
ys = r1 * sin(small_angles_3)
plt.plot(xs + 0.65, ys + 0.65, color = 'grey')

#points on the right top circle
x1 = r1 * cos(pi/2) + 0.645
y1 = r1 * sin(pi/2) + 0.65
plt.plot(x1, y1, color = 'grey', marker = 'o', markersize = 5)

x2 = r1 * cos(2 * pi) + 0.645
y2 = r1 * sin(2 * pi) + 0.65
plt.plot(x2, y2, color = 'grey', marker = 'o', markersize = 5)


## draw line from left top to middle to nearly goal
plt.plot(
    [0.38, 0.18],
    [0.62, 0.82],
    color = 'grey'
)

#create round circle on the left top side
small_angles_4 = np.linspace( pi, 10/8 * 2 * pi, 100)
xs = r1 * cos(small_angles_4)
ys = r1 * sin(small_angles_4)
plt.plot(xs + 0.35, ys + 0.65, color = 'grey')

#points on the left top circle
x1 = r1 * cos(pi) + 0.35
y1 = r1 * sin(pi) + 0.65
plt.plot(x1, y1, color = 'grey', marker = 'o', markersize = 5)

x2 = r1 * cos(10/8 * 2 * pi) + 0.35
y2 = r1 * sin(10/8 * 2 * pi) + 0.65
plt.plot(x2, y2, color = 'grey', marker = 'o', markersize = 5)



plt.gca().set_aspect('equal', adjustable='box')
plt.show()

Draw square lines inside the board

First horizental design

In [20]:
plt.figure(figsize=(8,8))

plt.plot(0, 0, marker = 'o', color = 'black')
plt.plot(1, 0, marker = 'o', color = 'black')
plt.plot(1, 1, marker = 'o', color = 'black')
plt.plot(0, 1, marker = 'o', color = 'black')

plt.plot(
    [0, 1, 1, 0, 0],
    [0, 0, 1, 1, 0]
)

#points of second line
plt.plot(0.08, 0.08, marker = 'o', color = 'red')
plt.plot(0.92, 0.08, marker = 'o', color = 'red')
plt.plot(0.92, 0.92, marker = 'o', color = 'red')
plt.plot(0.08, 0.92, marker = 'o', color = 'red')

plt.plot(
    [0.08, 0.92, 0.92, 0.08, 0.08],
    [0.08, 0.08, 0.92, 0.92, 0.08]
)

#create four goals on each corner
plt.plot(0.13, 0.13, marker = 'o', markersize = 30, color = 'black')
plt.plot(0.87, 0.13, marker = 'o', markersize = 30, color = 'black')
plt.plot(0.87, 0.87, marker = 'o', markersize = 30, color = 'black')
plt.plot(0.13, 0.87, marker = 'o', markersize = 30, color = 'black')

#create point in the middle
plt.plot(0.5, 0.5, marker = 'o', markersize = 10, color = 'red')

#create round circle
angles = np.linspace(0, 2 * pi, 100)
r = 0.1
xs = r * cos(angles)
ys = r * sin(angles)
plt.plot(xs + 0.5, ys + 0.5, color = 'grey')


## draw line on left bottom from middle to nearly goal
plt.plot(
    [0.38, 0.18],
    [0.38, 0.18],
    color = 'grey'
)


#create round circle
small_angles_1 = np.linspace(6/8 * 2 * pi, 12/8 * 2 * pi, 100)
r1 = 0.05
xs = r1 * cos(small_angles_1)
ys = r1 * sin(small_angles_1)
plt.plot(xs + 0.35, ys + 0.35, color = 'grey')

#points on the left bottom circle
x1 = r1 * cos(pi) + 0.35
y1 = r1 * sin( pi) + 0.35
plt.plot(x1, y1, color = 'grey', marker = 'o', markersize = 5)

x2 = r1 * cos(6/8 * 2 * pi) + 0.35
y2 = r1 * sin( 6/8 * 2 * pi) + 0.35
plt.plot(x2, y2, color = 'grey', marker = 'o', markersize = 5)


## draw line on right bottom from middle to nearly goal
plt.plot(
    [0.62, 0.82],
    [0.38, 0.18],
    color = 'grey'
)

#create round circle on the right side
small_angles_2 = np.linspace( 2 * pi, 14/8 * 2 * pi, 100)
xs = r1 * cos(small_angles_2)
ys = r1 * sin(small_angles_2)
plt.plot(xs + 0.65, ys + 0.35, color = 'grey')

#points on the right bottom circle
x1 = r1 * cos(2 * pi) + 0.645
y1 = r1 * sin( 2 * pi) + 0.35
plt.plot(x1, y1, color = 'grey', marker = 'o', markersize = 5)

x2 = r1 * cos(14/8 * 2 * pi) + 0.645
y2 = r1 * sin( 14/8 * 2 * pi) + 0.35
plt.plot(x2, y2, color = 'grey', marker = 'o', markersize = 5)


## draw line from right top to middle to nearly goal
plt.plot(
    [0.62, 0.82],
    [0.62, 0.82],
    color = 'grey'
)

#create round circle on the right top side
small_angles_3 = np.linspace( pi/ 2, 2 * pi, 100)
xs = r1 * cos(small_angles_3)
ys = r1 * sin(small_angles_3)
plt.plot(xs + 0.65, ys + 0.65, color = 'grey')

#points on the right top circle
x1 = r1 * cos(pi/2) + 0.645
y1 = r1 * sin(pi/2) + 0.65
plt.plot(x1, y1, color = 'grey', marker = 'o', markersize = 5)

x2 = r1 * cos(2 * pi) + 0.645
y2 = r1 * sin(2 * pi) + 0.65
plt.plot(x2, y2, color = 'grey', marker = 'o', markersize = 5)


## draw line from left top to middle to nearly goal
plt.plot(
    [0.38, 0.18],
    [0.62, 0.82],
    color = 'grey'
)

#create round circle on the left top side
small_angles_4 = np.linspace( pi, 10/8 * 2 * pi, 100)
xs = r1 * cos(small_angles_4)
ys = r1 * sin(small_angles_4)
plt.plot(xs + 0.35, ys + 0.65, color = 'grey')

#points on the left top circle
x1 = r1 * cos(pi) + 0.35
y1 = r1 * sin(pi) + 0.65
plt.plot(x1, y1, color = 'grey', marker = 'o', markersize = 5)

x2 = r1 * cos(10/8 * 2 * pi) + 0.35
y2 = r1 * sin(10/8 * 2 * pi) + 0.65
plt.plot(x2, y2, color = 'grey', marker = 'o', markersize = 5)


##First horizental design
plt.plot([0.26, 0.75], [0.21, 0.21], color = 'black')
plt.plot([0.25, 0.75], [0.24, 0.24], color = 'black', alpha=0.1)
plt.plot(0.25, 0.225, color = 'brown', marker = 'o', markersize = 12)
plt.plot(0.75, 0.225, color = 'brown', marker = 'o', markersize = 12)


plt.gca().set_aspect('equal', adjustable='box')
plt.show()

second right vertical design

In [21]:
plt.figure(figsize=(8,8))

plt.plot(0, 0, marker = 'o', color = 'black')
plt.plot(1, 0, marker = 'o', color = 'black')
plt.plot(1, 1, marker = 'o', color = 'black')
plt.plot(0, 1, marker = 'o', color = 'black')

plt.plot(
    [0, 1, 1, 0, 0],
    [0, 0, 1, 1, 0]
)

#points of second line
plt.plot(0.08, 0.08, marker = 'o', color = 'red')
plt.plot(0.92, 0.08, marker = 'o', color = 'red')
plt.plot(0.92, 0.92, marker = 'o', color = 'red')
plt.plot(0.08, 0.92, marker = 'o', color = 'red')

plt.plot(
    [0.08, 0.92, 0.92, 0.08, 0.08],
    [0.08, 0.08, 0.92, 0.92, 0.08]
)

#create four goals on each corner
plt.plot(0.13, 0.13, marker = 'o', markersize = 30, color = 'black')
plt.plot(0.87, 0.13, marker = 'o', markersize = 30, color = 'black')
plt.plot(0.87, 0.87, marker = 'o', markersize = 30, color = 'black')
plt.plot(0.13, 0.87, marker = 'o', markersize = 30, color = 'black')

#create point in the middle
plt.plot(0.5, 0.5, marker = 'o', markersize = 10, color = 'red')

#create round circle
angles = np.linspace(0, 2 * pi, 100)
r = 0.1
xs = r * cos(angles)
ys = r * sin(angles)
plt.plot(xs + 0.5, ys + 0.5, color = 'grey')


## draw line on left bottom from middle to nearly goal
plt.plot(
    [0.38, 0.18],
    [0.38, 0.18],
    color = 'grey'
)

#create round circle
small_angles_1 = np.linspace(6/8 * 2 * pi, 12/8 * 2 * pi, 100)
r1 = 0.05
xs = r1 * cos(small_angles_1)
ys = r1 * sin(small_angles_1)
plt.plot(xs + 0.35, ys + 0.35, color = 'grey')

#points on the left bottom circle
x1 = r1 * cos(pi) + 0.35
y1 = r1 * sin( pi) + 0.35
plt.plot(x1, y1, color = 'grey', marker = 'o', markersize = 5)

x2 = r1 * cos(6/8 * 2 * pi) + 0.35
y2 = r1 * sin( 6/8 * 2 * pi) + 0.35
plt.plot(x2, y2, color = 'grey', marker = 'o', markersize = 5)


## draw line on right bottom from middle to nearly goal
plt.plot(
    [0.62, 0.82],
    [0.38, 0.18],
    color = 'grey'
)

#create round circle on the right side
small_angles_2 = np.linspace( 2 * pi, 14/8 * 2 * pi, 100)
xs = r1 * cos(small_angles_2)
ys = r1 * sin(small_angles_2)
plt.plot(xs + 0.65, ys + 0.35, color = 'grey')

#points on the right bottom circle
x1 = r1 * cos(2 * pi) + 0.645
y1 = r1 * sin( 2 * pi) + 0.35
plt.plot(x1, y1, color = 'grey', marker = 'o', markersize = 5)

x2 = r1 * cos(14/8 * 2 * pi) + 0.645
y2 = r1 * sin( 14/8 * 2 * pi) + 0.35
plt.plot(x2, y2, color = 'grey', marker = 'o', markersize = 5)


## draw line from right top to middle to nearly goal
plt.plot(
    [0.62, 0.82],
    [0.62, 0.82],
    color = 'grey'
)

#create round circle on the right top side
small_angles_3 = np.linspace( pi/ 2, 2 * pi, 100)
xs = r1 * cos(small_angles_3)
ys = r1 * sin(small_angles_3)
plt.plot(xs + 0.65, ys + 0.65, color = 'grey')

#points on the right top circle
x1 = r1 * cos(pi/2) + 0.645
y1 = r1 * sin(pi/2) + 0.65
plt.plot(x1, y1, color = 'grey', marker = 'o', markersize = 5)

x2 = r1 * cos(2 * pi) + 0.645
y2 = r1 * sin(2 * pi) + 0.65
plt.plot(x2, y2, color = 'grey', marker = 'o', markersize = 5)


## draw line from left top to middle to nearly goal
plt.plot(
    [0.38, 0.18],
    [0.62, 0.82],
    color = 'grey'
)

#create round circle on the left top side
small_angles_4 = np.linspace( pi, 10/8 * 2 * pi, 100)
xs = r1 * cos(small_angles_4)
ys = r1 * sin(small_angles_4)
plt.plot(xs + 0.35, ys + 0.65, color = 'grey')

#points on the left top circle
x1 = r1 * cos(pi) + 0.35
y1 = r1 * sin(pi) + 0.65
plt.plot(x1, y1, color = 'grey', marker = 'o', markersize = 5)

x2 = r1 * cos(10/8 * 2 * pi) + 0.35
y2 = r1 * sin(10/8 * 2 * pi) + 0.65
plt.plot(x2, y2, color = 'grey', marker = 'o', markersize = 5)


##First horizental design
plt.plot([0.26, 0.75], [0.21, 0.21], color = 'black')
plt.plot([0.25, 0.75], [0.24, 0.24], color = 'black', alpha=0.1)
plt.plot(0.25, 0.225, color = 'brown', marker = 'o', markersize = 12)
plt.plot(0.75, 0.225, color = 'brown', marker = 'o', markersize = 12)


##right vertical design
plt.plot([0.77, 0.77], [0.26, 0.76], color = 'green', alpha=0.1)
plt.plot([0.80, 0.80], [0.25, 0.76], color = 'black')

plt.plot(0.785, 0.25, color = 'brown', marker = 'o', markersize = 12)
plt.plot(0.785, 0.76, color = 'brown', marker = 'o', markersize = 12)

plt.gca().set_aspect('equal', adjustable='box')
plt.show()

Left horizental design

In [22]:
plt.figure(figsize=(8,8))

plt.plot(0, 0, marker = 'o', color = 'black')
plt.plot(1, 0, marker = 'o', color = 'black')
plt.plot(1, 1, marker = 'o', color = 'black')
plt.plot(0, 1, marker = 'o', color = 'black')

plt.plot(
    [0, 1, 1, 0, 0],
    [0, 0, 1, 1, 0]
)

#points of second line
plt.plot(0.08, 0.08, marker = 'o', color = 'red')
plt.plot(0.92, 0.08, marker = 'o', color = 'red')
plt.plot(0.92, 0.92, marker = 'o', color = 'red')
plt.plot(0.08, 0.92, marker = 'o', color = 'red')

plt.plot(
    [0.08, 0.92, 0.92, 0.08, 0.08],
    [0.08, 0.08, 0.92, 0.92, 0.08]
)

#create four goals on each corner
plt.plot(0.13, 0.13, marker = 'o', markersize = 30, color = 'black')
plt.plot(0.87, 0.13, marker = 'o', markersize = 30, color = 'black')
plt.plot(0.87, 0.87, marker = 'o', markersize = 30, color = 'black')
plt.plot(0.13, 0.87, marker = 'o', markersize = 30, color = 'black')

#create point in the middle
plt.plot(0.5, 0.5, marker = 'o', markersize = 10, color = 'red')

#create round circle
angles = np.linspace(0, 2 * pi, 100)
r = 0.1
xs = r * cos(angles)
ys = r * sin(angles)
plt.plot(xs + 0.5, ys + 0.5, color = 'grey')


## draw line on left bottom from middle to nearly goal
plt.plot(
    [0.38, 0.18],
    [0.38, 0.18],
    color = 'grey'
)

#create round circle
small_angles_1 = np.linspace(6/8 * 2 * pi, 12/8 * 2 * pi, 100)
r1 = 0.05
xs = r1 * cos(small_angles_1)
ys = r1 * sin(small_angles_1)
plt.plot(xs + 0.35, ys + 0.35, color = 'grey')

#points on the left bottom circle
x1 = r1 * cos(pi) + 0.35
y1 = r1 * sin( pi) + 0.35
plt.plot(x1, y1, color = 'grey', marker = 'o', markersize = 5)

x2 = r1 * cos(6/8 * 2 * pi) + 0.35
y2 = r1 * sin( 6/8 * 2 * pi) + 0.35
plt.plot(x2, y2, color = 'grey', marker = 'o', markersize = 5)


## draw line on right bottom from middle to nearly goal
plt.plot(
    [0.62, 0.82],
    [0.38, 0.18],
    color = 'grey'
)

#create round circle on the right side
small_angles_2 = np.linspace( 2 * pi, 14/8 * 2 * pi, 100)
xs = r1 * cos(small_angles_2)
ys = r1 * sin(small_angles_2)
plt.plot(xs + 0.65, ys + 0.35, color = 'grey')

#points on the right bottom circle
x1 = r1 * cos(2 * pi) + 0.645
y1 = r1 * sin( 2 * pi) + 0.35
plt.plot(x1, y1, color = 'grey', marker = 'o', markersize = 5)

x2 = r1 * cos(14/8 * 2 * pi) + 0.645
y2 = r1 * sin( 14/8 * 2 * pi) + 0.35
plt.plot(x2, y2, color = 'grey', marker = 'o', markersize = 5)


## draw line from right top to middle to nearly goal
plt.plot(
    [0.62, 0.82],
    [0.62, 0.82],
    color = 'grey'
)

#create round circle on the right top side
small_angles_3 = np.linspace( pi/ 2, 2 * pi, 100)
xs = r1 * cos(small_angles_3)
ys = r1 * sin(small_angles_3)
plt.plot(xs + 0.65, ys + 0.65, color = 'grey')

#points on the right top circle
x1 = r1 * cos(pi/2) + 0.645
y1 = r1 * sin(pi/2) + 0.65
plt.plot(x1, y1, color = 'grey', marker = 'o', markersize = 5)

x2 = r1 * cos(2 * pi) + 0.645
y2 = r1 * sin(2 * pi) + 0.65
plt.plot(x2, y2, color = 'grey', marker = 'o', markersize = 5)


## draw line from left top to middle to nearly goal
plt.plot(
    [0.38, 0.18],
    [0.62, 0.82],
    color = 'grey'
)

#create round circle on the left top side
small_angles_4 = np.linspace( pi, 10/8 * 2 * pi, 100)
xs = r1 * cos(small_angles_4)
ys = r1 * sin(small_angles_4)
plt.plot(xs + 0.35, ys + 0.65, color = 'grey')

#points on the left top circle
x1 = r1 * cos(pi) + 0.35
y1 = r1 * sin(pi) + 0.65
plt.plot(x1, y1, color = 'grey', marker = 'o', markersize = 5)

x2 = r1 * cos(10/8 * 2 * pi) + 0.35
y2 = r1 * sin(10/8 * 2 * pi) + 0.65
plt.plot(x2, y2, color = 'grey', marker = 'o', markersize = 5)


##First horizental design
plt.plot([0.26, 0.75], [0.21, 0.21], color = 'black')
plt.plot([0.25, 0.75], [0.24, 0.24], color = 'black', alpha=0.1)
plt.plot(0.25, 0.225, color = 'brown', marker = 'o', markersize = 12)
plt.plot(0.75, 0.225, color = 'brown', marker = 'o', markersize = 12)


##right vertical design
plt.plot([0.77, 0.77], [0.26, 0.76], color = 'green', alpha=0.1)
plt.plot([0.80, 0.80], [0.25, 0.76], color = 'black')

plt.plot(0.785, 0.25, color = 'brown', marker = 'o', markersize = 12)
plt.plot(0.785, 0.76, color = 'brown', marker = 'o', markersize = 12)

##left horizental design
plt.plot([0.76, 0.26], [0.76, 0.76], color = 'black', alpha=0.1)
plt.plot([0.76, 0.26], [0.79, 0.79], color = 'black')

plt.plot(0.75, 0.78, color = 'brown', marker = 'o', markersize = 12)
plt.plot(0.25, 0.78, color = 'brown', marker = 'o', markersize = 12)

plt.gca().set_aspect('equal', adjustable='box')
plt.show()

Down vertical design

In [23]:
plt.figure(figsize=(8,8))

plt.plot(0, 0, marker = 'o', color = 'black')
plt.plot(1, 0, marker = 'o', color = 'black')
plt.plot(1, 1, marker = 'o', color = 'black')
plt.plot(0, 1, marker = 'o', color = 'black')

plt.plot(
    [0, 1, 1, 0, 0],
    [0, 0, 1, 1, 0]
)

#points of second line
plt.plot(0.08, 0.08, marker = 'o', color = 'red')
plt.plot(0.92, 0.08, marker = 'o', color = 'red')
plt.plot(0.92, 0.92, marker = 'o', color = 'red')
plt.plot(0.08, 0.92, marker = 'o', color = 'red')

plt.plot(
    [0.08, 0.92, 0.92, 0.08, 0.08],
    [0.08, 0.08, 0.92, 0.92, 0.08]
)

#create four goals on each corner
plt.plot(0.13, 0.13, marker = 'o', markersize = 30, color = 'black')
plt.plot(0.87, 0.13, marker = 'o', markersize = 30, color = 'black')
plt.plot(0.87, 0.87, marker = 'o', markersize = 30, color = 'black')
plt.plot(0.13, 0.87, marker = 'o', markersize = 30, color = 'black')

#create point in the middle
plt.plot(0.5, 0.5, marker = 'o', markersize = 10, color = 'red')

#create round circle
angles = np.linspace(0, 2 * pi, 100)
r = 0.1
xs = r * cos(angles)
ys = r * sin(angles)
plt.plot(xs + 0.5, ys + 0.5, color = 'grey')


## draw line on left bottom from middle to nearly goal
plt.plot(
    [0.38, 0.18],
    [0.38, 0.18],
    color = 'grey'
)


#create round circle
small_angles_1 = np.linspace(6/8 * 2 * pi, 12/8 * 2 * pi, 100)
r1 = 0.05
xs = r1 * cos(small_angles_1)
ys = r1 * sin(small_angles_1)
plt.plot(xs + 0.35, ys + 0.35, color = 'grey')

#points on the left bottom circle
x1 = r1 * cos(pi) + 0.35
y1 = r1 * sin( pi) + 0.35
plt.plot(x1, y1, color = 'grey', marker = 'o', markersize = 5)

x2 = r1 * cos(6/8 * 2 * pi) + 0.35
y2 = r1 * sin( 6/8 * 2 * pi) + 0.35
plt.plot(x2, y2, color = 'grey', marker = 'o', markersize = 5)


## draw line on right bottom from middle to nearly goal
plt.plot(
    [0.62, 0.82],
    [0.38, 0.18],
    color = 'grey'
)

#create round circle on the right side
small_angles_2 = np.linspace( 2 * pi, 14/8 * 2 * pi, 100)
xs = r1 * cos(small_angles_2)
ys = r1 * sin(small_angles_2)
plt.plot(xs + 0.65, ys + 0.35, color = 'grey')

#points on the right bottom circle
x1 = r1 * cos(2 * pi) + 0.645
y1 = r1 * sin( 2 * pi) + 0.35
plt.plot(x1, y1, color = 'grey', marker = 'o', markersize = 5)

x2 = r1 * cos(14/8 * 2 * pi) + 0.645
y2 = r1 * sin( 14/8 * 2 * pi) + 0.35
plt.plot(x2, y2, color = 'grey', marker = 'o', markersize = 5)


## draw line from right top to middle to nearly goal
plt.plot(
    [0.62, 0.82],
    [0.62, 0.82],
    color = 'grey'
)

#create round circle on the right top side
small_angles_3 = np.linspace( pi/ 2, 2 * pi, 100)
xs = r1 * cos(small_angles_3)
ys = r1 * sin(small_angles_3)
plt.plot(xs + 0.65, ys + 0.65, color = 'grey')

#points on the right top circle
x1 = r1 * cos(pi/2) + 0.645
y1 = r1 * sin(pi/2) + 0.65
plt.plot(x1, y1, color = 'grey', marker = 'o', markersize = 5)

x2 = r1 * cos(2 * pi) + 0.645
y2 = r1 * sin(2 * pi) + 0.65
plt.plot(x2, y2, color = 'grey', marker = 'o', markersize = 5)

## draw line from left top to middle to nearly goal
plt.plot(
    [0.38, 0.18],
    [0.62, 0.82],
    color = 'grey'
)

#create round circle on the left top side
small_angles_4 = np.linspace( pi, 10/8 * 2 * pi, 100)
xs = r1 * cos(small_angles_4)
ys = r1 * sin(small_angles_4)
plt.plot(xs + 0.35, ys + 0.65, color = 'grey')

#points on the left top circle
x1 = r1 * cos(pi) + 0.35
y1 = r1 * sin(pi) + 0.65
plt.plot(x1, y1, color = 'grey', marker = 'o', markersize = 5)

x2 = r1 * cos(10/8 * 2 * pi) + 0.35
y2 = r1 * sin(10/8 * 2 * pi) + 0.65
plt.plot(x2, y2, color = 'grey', marker = 'o', markersize = 5)


##First horizental design
plt.plot([0.26, 0.75], [0.21, 0.21], color = 'black')
plt.plot([0.25, 0.75], [0.24, 0.24], color = 'black', alpha=0.1)
plt.plot(0.25, 0.225, color = 'brown', marker = 'o', markersize = 12)
plt.plot(0.75, 0.225, color = 'brown', marker = 'o', markersize = 12)


##right vertical design
plt.plot([0.77, 0.77], [0.26, 0.76], color = 'green', alpha=0.1)
plt.plot([0.80, 0.80], [0.25, 0.76], color = 'black')

plt.plot(0.785, 0.25, color = 'brown', marker = 'o', markersize = 12)
plt.plot(0.785, 0.76, color = 'brown', marker = 'o', markersize = 12)

##left horizental design
plt.plot([0.76, 0.26], [0.76, 0.76], color = 'black', alpha=0.1)
plt.plot([0.76, 0.26], [0.79, 0.79], color = 'black')

plt.plot(0.75, 0.78, color = 'brown', marker = 'o', markersize = 12)
plt.plot(0.25, 0.78, color = 'brown', marker = 'o', markersize = 12)

##down vertical design
plt.plot([0.24, 0.24], [0.74, 0.27], color = 'black', alpha=0.1)
plt.plot([0.21, 0.21], [0.74, 0.27], color = 'black')

plt.plot(0.225, 0.74, color = 'brown', marker = 'o', markersize = 12)
plt.plot(0.225, 0.26, color = 'brown', marker = 'o', markersize = 12)


plt.gca().set_aspect('equal', adjustable='box')
plt.show()

Final code

In [24]:
plt.figure(figsize=(8,8))

plt.plot(0, 0, marker = 'o', color = 'black')
plt.plot(1, 0, marker = 'o', color = 'black')
plt.plot(1, 1, marker = 'o', color = 'black')
plt.plot(0, 1, marker = 'o', color = 'black')

plt.plot(
    [0, 1, 1, 0, 0],
    [0, 0, 1, 1, 0]
)

#points of second line
plt.plot(0.08, 0.08, marker = 'o', color = 'red')
plt.plot(0.92, 0.08, marker = 'o', color = 'red')
plt.plot(0.92, 0.92, marker = 'o', color = 'red')
plt.plot(0.08, 0.92, marker = 'o', color = 'red')

plt.plot(
    [0.08, 0.92, 0.92, 0.08, 0.08],
    [0.08, 0.08, 0.92, 0.92, 0.08]
)

#create four goals on each corner
plt.plot(0.13, 0.13, marker = 'o', markersize = 30, color = 'black')
plt.plot(0.87, 0.13, marker = 'o', markersize = 30, color = 'black')
plt.plot(0.87, 0.87, marker = 'o', markersize = 30, color = 'black')
plt.plot(0.13, 0.87, marker = 'o', markersize = 30, color = 'black')

#create point in the middle
plt.plot(0.5, 0.5, marker = 'o', markersize = 10, color = 'red')

#create round circle
angles = np.linspace(0, 2 * pi, 100)
r = 0.1
xs = r * cos(angles)
ys = r * sin(angles)
plt.plot(xs + 0.5, ys + 0.5, color = 'grey')


## draw line on left bottom from middle to nearly goal
plt.plot(
    [0.38, 0.18],
    [0.38, 0.18],
    color = 'grey'
)

#create round circle
small_angles_1 = np.linspace(6/8 * 2 * pi, 12/8 * 2 * pi, 100)
r1 = 0.05
xs = r1 * cos(small_angles_1)
ys = r1 * sin(small_angles_1)
plt.plot(xs + 0.35, ys + 0.35, color = 'grey')

#points on the left bottom circle
x1 = r1 * cos(pi) + 0.35
y1 = r1 * sin( pi) + 0.35
plt.plot(x1, y1, color = 'grey', marker = 'o', markersize = 5)

x2 = r1 * cos(6/8 * 2 * pi) + 0.35
y2 = r1 * sin( 6/8 * 2 * pi) + 0.35
plt.plot(x2, y2, color = 'grey', marker = 'o', markersize = 5)


## draw line on right bottom from middle to nearly goal
plt.plot(
    [0.62, 0.82],
    [0.38, 0.18],
    color = 'grey'
)

#create round circle on the right side
small_angles_2 = np.linspace( 2 * pi, 14/8 * 2 * pi, 100)
xs = r1 * cos(small_angles_2)
ys = r1 * sin(small_angles_2)
plt.plot(xs + 0.65, ys + 0.35, color = 'grey')

#points on the right bottom circle
x1 = r1 * cos(2 * pi) + 0.645
y1 = r1 * sin( 2 * pi) + 0.35
plt.plot(x1, y1, color = 'grey', marker = 'o', markersize = 5)

x2 = r1 * cos(14/8 * 2 * pi) + 0.645
y2 = r1 * sin( 14/8 * 2 * pi) + 0.35
plt.plot(x2, y2, color = 'grey', marker = 'o', markersize = 5)


## draw line from right top to middle to nearly goal
plt.plot(
    [0.62, 0.82],
    [0.62, 0.82],
    color = 'grey'
)

#create round circle on the right top side
small_angles_3 = np.linspace( pi/ 2, 2 * pi, 100)
xs = r1 * cos(small_angles_3)
ys = r1 * sin(small_angles_3)
plt.plot(xs + 0.65, ys + 0.65, color = 'grey')

#points on the right top circle
x1 = r1 * cos(pi/2) + 0.645
y1 = r1 * sin(pi/2) + 0.65
plt.plot(x1, y1, color = 'grey', marker = 'o', markersize = 5)

x2 = r1 * cos(2 * pi) + 0.645
y2 = r1 * sin(2 * pi) + 0.65
plt.plot(x2, y2, color = 'grey', marker = 'o', markersize = 5)


## draw line from left top to middle to nearly goal
plt.plot(
    [0.38, 0.18],
    [0.62, 0.82],
    color = 'grey'
)

#create round circle on the left top side
small_angles_4 = np.linspace( pi, 10/8 * 2 * pi, 100)
xs = r1 * cos(small_angles_4)
ys = r1 * sin(small_angles_4)
plt.plot(xs + 0.35, ys + 0.65, color = 'grey')

#points on the left top circle
x1 = r1 * cos(pi) + 0.35
y1 = r1 * sin(pi) + 0.65
plt.plot(x1, y1, color = 'grey', marker = 'o', markersize = 5)

x2 = r1 * cos(10/8 * 2 * pi) + 0.35
y2 = r1 * sin(10/8 * 2 * pi) + 0.65
plt.plot(x2, y2, color = 'grey', marker = 'o', markersize = 5)


##First horizental design
plt.plot([0.26, 0.75], [0.21, 0.21], color = 'black')
plt.plot([0.25, 0.75], [0.24, 0.24], color = 'black', alpha=0.1)
plt.plot(0.25, 0.225, color = 'brown', marker = 'o', markersize = 12)
plt.plot(0.75, 0.225, color = 'brown', marker = 'o', markersize = 12)


##right vertical design
plt.plot([0.77, 0.77], [0.26, 0.76], color = 'green', alpha=0.1)
plt.plot([0.80, 0.80], [0.25, 0.76], color = 'black')

plt.plot(0.785, 0.25, color = 'brown', marker = 'o', markersize = 12)
plt.plot(0.785, 0.76, color = 'brown', marker = 'o', markersize = 12)

##left horizental design
plt.plot([0.76, 0.26], [0.76, 0.76], color = 'black', alpha=0.1)
plt.plot([0.76, 0.26], [0.79, 0.79], color = 'black')

plt.plot(0.75, 0.78, color = 'brown', marker = 'o', markersize = 12)
plt.plot(0.25, 0.78, color = 'brown', marker = 'o', markersize = 12)

##down vertical design
plt.plot([0.24, 0.24], [0.74, 0.27], color = 'black', alpha=0.1)
plt.plot([0.21, 0.21], [0.74, 0.27], color = 'black')

plt.plot(0.225, 0.74, color = 'brown', marker = 'o', markersize = 12)
plt.plot(0.225, 0.26, color = 'brown', marker = 'o', markersize = 12)


plt.gca().set_aspect('equal', adjustable='box')
plt.axis("off")
plt.show()

Machine Learning

  1. Deal Banking Marketing Campaign Dataset With Machine Learning

TensorFlow

  1. Difference Between Scalar, Vector, Matrix and Tensor
  2. TensorFlow Deep Learning Model With IRIS Dataset
  3. Sequence to Sequence Learning With Neural Networks To Perform Number Addition
  4. Image Classification Model MobileNet V2 from TensorFlow Hub
  5. Step by Step Intent Recognition With BERT
  6. Sentiment Analysis for Hotel Reviews With NLTK and Keras
  7. Simple Sequence Prediction With LSTM
  8. Image Classification With ResNet50 Model
  9. Predict Amazon Inc Stock Price with Machine Learning
  10. Predict Diabetes With Machine Learning Algorithms
  11. TensorFlow Build Custom Convolutional Neural Network With MNIST Dataset
  12. Deal Banking Marketing Campaign Dataset With Machine Learning

PySpark

  1. How to Parallelize and Distribute Collection in PySpark
  2. Role of StringIndexer and Pipelines in PySpark ML Feature - Part 1
  3. Role of OneHotEncoder and Pipelines in PySpark ML Feature - Part 2
  4. Feature Transformer VectorAssembler in PySpark ML Feature - Part 3
  5. Logistic Regression in PySpark (ML Feature) with Breast Cancer Data Set

PyTorch

  1. Build the Neural Network with PyTorch
  2. Image Classification with PyTorch
  3. Twitter Sentiment Classification In PyTorch
  4. Training an Image Classifier in Pytorch

Natural Language Processing

  1. Spelling Correction Of The Text Data In Natural Language Processing
  2. Handling Text For Machine Learning
  3. Extracting Text From PDF File in Python Using PyPDF2
  4. How to Collect Data Using Twitter API V2 For Natural Language Processing
  5. Converting Text to Features in Natural Language Processing
  6. Extract A Noun Phrase For A Sentence In Natural Language Processing