Thursday 15 August 2024

Happy Independence Day India

 

import numpy as np

import matplotlib.pyplot as py

import matplotlib.patches as patch


a = patch.Rectangle((0,1), width=9, height=2, facecolor='#138808', edgecolor='grey')

b = patch.Rectangle((0,3), width=9, height=2, facecolor='#ffffff', edgecolor='grey')

c = patch.Rectangle((0,5), width=9, height=2, facecolor='#FF6103', edgecolor='grey')

m,n = py.subplots()

n.add_patch(a)

n.add_patch(b)

n.add_patch(c)


radius=0.8

py.plot(4.5,4, marker = 'o', markerfacecolor = '#000080', markersize = 9.5)

chakra = py.Circle((4.5, 4), radius, color='#000080', fill=False, linewidth=7)

n.add_artist(chakra)


for i in range(0,24):

   p = 4.5 + radius/2 * np.cos(np.pi*i/9 + np.pi/48)

   q = 4.5 + radius/2 * np.cos(np.pi*i/9 - np.pi/48)

   r = 4 + radius/2 * np.sin(np.pi*i/9 + np.pi/48)

   s = 4 + radius/2 * np.sin(np.pi*i/9 - np.pi/48)

   t = 4.5 + radius * np.cos(np.pi*i/9)

   u = 4 + radius * np.sin(np.pi*i/9)

   n.add_patch(patch.Polygon([[4.5,4], [p,r], [t,u],[q,s]], fill=True, 

                             closed=True, color='#000080'))

py.axis('equal')

py.show() 

#clcoding.com

0 Comments:

Post a Comment

Popular Posts

Categories

AI (29) Android (24) AngularJS (1) Assembly Language (2) aws (17) Azure (7) BI (10) book (4) Books (122) C (77) C# (12) C++ (82) Course (67) Coursera (195) Cybersecurity (24) data management (11) Data Science (100) Data Strucures (7) Deep Learning (11) Django (14) Downloads (3) edx (2) Engineering (14) Excel (13) Factorial (1) Finance (6) flask (3) flutter (1) FPL (17) Google (19) Hadoop (3) HTML&CSS (46) IBM (25) IoT (1) IS (25) Java (93) Leet Code (4) Machine Learning (46) Meta (18) MICHIGAN (5) microsoft (4) Pandas (3) PHP (20) Projects (29) Python (840) Python Coding Challenge (279) Questions (2) R (70) React (6) Scripting (1) security (3) Selenium Webdriver (2) Software (17) SQL (41) UX Research (1) web application (8)

Followers

Person climbing a staircase. Learn Data Science from Scratch: online program with 21 courses