Lord Krishna Painting Using Python Turtle

Is article me, hum apko dikhaenge ki Python turtle graphics ka use karke Lord Krishna ki painting kaise banayi jati hai, python me ek turtle module hai, turtle bacho ko programming se parichit karne ka ek useful tarika hai.
Lord Krishna Painting Using Python Turtle

Lord Krishna Painting Using Python Turtle

Installation:

Isse pehle ki hum drawing suru kare, hume yeh sunishchit karna hoga ki humare cumputer par Python aur Turtle library install hai ke nahi, inko install karne ke steps yaha diye gaye hai:

Apni terminal window khole aur Turtle library install karne ke liye following command enter kare:
                     $ pip install turtle                    

Lord Krishna Painting using Python Turtle, is steps ko follow kare:
  1. Koi sa bhi python code Editor open kare.
  2. Required module ko import kare.
  3. Python ka use karke Lord Krishna Painting Using Python Turtle code ko copy kare, jo meine is article me niche provid kara hai, aur ise “krishna.py”(ya koi anye naam jise ap pasand karte hai) se file save kare.
  4. Drawing start karne ke liye krishna.py ko run kare.

Complete source code for The Lord Krishna Painting using Python Turtle(code ko copy kare aur run kare)
from turtle import *
from time import *
title("Jay Shree Krishna")

setup(768,500)
bgcolor("#1b1212")
sleep(2)
speed(0)
color('#CCCCFF')
up()
setheading(166)
forward(200)
down()
# eye1 
pensize(4)
setheading(150)
circle(70,13)
pensize(5)
circle(70,10)
pensize(6)
circle(70,10)
pensize(7)
circle(70,15)
pensize(5)
circle(70,8)
pensize(3)
circle(70,7)
pensize(2)
circle(70,5)

up()
setheading(-19.5)
forward(104)
down()

pensize(5)
setheading(137)
forward(8)
pensize(4)
forward(5)
circle(8,92)
circle(-37,26)
pensize(5)
circle(-37,20)
pensize(6)
circle(-37,10)
pensize(7)
circle(-37,10)
pensize(6)
circle(-37,10)
pensize(4)
circle(-37,10)
pensize(3)
forward(8)
pensize(2)
forward(7)
pensize(1)
forward(5)

up()
setheading(17.5)
forward(123)
down()
# eye2 
pensize(5)
setheading(58)
circle(-80,5)
pensize(6)
circle(-80,10)
pensize(7)
circle(-80,15)
pensize(8)
circle(-80,15)
pensize(7)
circle(-80,10)
pensize(6)
circle(-80,8)
pensize(4)
circle(-80,7)
pensize(3)
circle(-80,5)
pensize(2)
circle(-80,3)
pensize(1)
circle(-80,2)
up()
setheading(-139)
forward(118)
down()
pensize(5)
setheading(68)
forward(6)
pensize(4)
forward(3)
pensize(3)
forward(6)
circle(-12,57)
pensize(4)
circle(-12,20)
pensize(5)
circle(-12,10)
pensize(6)
circle(45,30)
pensize(7)
circle(45,20)
pensize(6)
circle(45,15)
pensize(4)
circle(45,8)
pensize(3)
circle(45,7)
forward(17)
pensize(2)
forward(10)
up()
setheading(163)
forward(165)
down()

setheading(-10)
pensize(4)
forward(5)
setheading(-45)
circle(-50,30)
pensize(5)
circle(-50,10)
pensize(6)
forward(15)
circle(45,39)
circle(7,138)
pensize(7)
forward(30)
pensize(6)
forward(20)
pensize(5)
forward(10)
pensize(4)
forward(5)
circle(-18,35)
pensize(3)
circle(-18,20)
up()
setheading(-89.5)
forward(167)
down()
# nose
circle(45,40)
up()
setheading(-120)
forward(31)
down()
# mouth
setheading(27)
forward(18)
circle(-9,85)
setheading(78)
circle(-10,98)
circle(25,80)
setheading(-127)
circle(-67,68)
up()
setheading(-35)
forward(13)
down()
setheading(-30)
circle(37,85)

pensize(1)
up()
setheading(151.5)
forward(270)
down()
# head1
begin_fill()
setheading(127)
circle(-90,43)
setheading(45.5)
forward(118)
circle(-1,165)
forward(74)
circle(25,45)
setheading(-111)
forward(50)
setheading(-40)
forward(10)
setheading(61)
forward(100)
circle(-185,32)
circle(1,175)
circle(200,37)
circle(-2.5,180)
forward(48)
setheading(60)
circle(-180,58)
setheading(173)
circle(150,60)
setheading(-155)
circle(238,33)
setheading(-92)
circle(95,43)
end_fill()
up()
setheading(23)
forward(55)
down()
# head2
begin_fill()
setheading(52)
circle(-400,24)
setheading(-165)
circle(200,50)
end_fill()
up()
setheading(38)
forward(150)
down()
# head3
begin_fill()
setheading(2)
circle(-180,20)
setheading(133)
circle(55,70)
end_fill()

up()
setheading(9)
forward(152)
down()
# head4
begin_fill()
setheading(-20)
circle(-50,98)
setheading(80)
circle(70,65)
end_fill()

up()
setheading(-91)
forward(80)
down()
# hair1
setheading(-35)
pensize(3)
circle(-25,45)
pensize(4)
circle(-25,50)
pensize(5)
circle(-10,70)
pensize(5)
circle(-18,80)
circle(-11,150)
pensize(4)
circle(-11,60)
pensize(3)
circle(-11,30)
pensize(2)
circle(-11,20)
pensize(1)
circle(-11,10)

up()
setheading(32)
forward(29)
down()
# hair2
setheading(24)
pensize(3)
circle(-25,45)
pensize(4)
circle(-25,50)
pensize(5)
circle(-11,70)
pensize(5)
circle(-19,80)
circle(-12,150)
pensize(4)
circle(-12,60)
pensize(3)
circle(-12,30)
pensize(2)
circle(-12,20)
pensize(1)
circle(-12,10)

up()
setheading(170)
forward(31)
down()
# hair3
setheading(-33)
pensize(3)
circle(-48,45)
pensize(4)
circle(-48,50)
pensize(5)
circle(-22,90)
pensize(6)
circle(-30,95)
pensize(6)
circle(-20,150)
pensize(5)
circle(-20,60)
pensize(4)
circle(-20,30)
pensize(3)
circle(-20,20)
pensize(2)
circle(-20,10)

up()
setheading(169)
forward(245)
down()
# hair1.0
setheading(-155)
pensize(3)
circle(25,45)
pensize(4)
circle(25,50)
pensize(5)
circle(10,85)
pensize(6)
circle(16,70)
circle(10,150)
pensize(4)
circle(10,60)
pensize(3)
circle(10,30)
pensize(2)
circle(10,20)
pensize(1)
circle(10,10)

up()
setheading(167)
forward(23)
down()
# hair2.0
setheading(168)
pensize(3)
circle(25,45)
pensize(4)
circle(25,50)
pensize(5)
circle(12,85)
pensize(6)
circle(19,70)
circle(11,150)
pensize(4)
circle(11,60)
pensize(3)
circle(11,30)
pensize(2)
circle(11,20)
pensize(1)
circle(11,10)

up()
setheading(21)
forward(30)
down()
# hair3.0
setheading(-148)
pensize(3)
circle(48,40)
pensize(5)
circle(48,50)
pensize(6)
circle(22,90)
pensize(7)
circle(30,95)
pensize(6)
circle(20,150)
pensize(5)
circle(20,60)
pensize(4)
circle(20,30)
pensize(3)
circle(20,20)
pensize(2)
circle(20,10)

up()
setheading(33)
forward(258)
down()
#1 peacock1
pensize(3)
setheading(85)
circle(150,25)

pensize(1)
up()
setheading(-88)
forward(42)
down()
# peacock2
begin_fill()
setheading(131)
circle(-75,45)
circle(-12,150)
circle(-85,35)
setheading(88)
circle(75,34)
circle(5,137)
circle(75,40)
end_fill()

up()
setheading(135)
forward(15)
down()
# peacock3
begin_fill()
setheading(140)
circle(-65,77)
circle(-20,125)
circle(-85,45)
setheading(84)
circle(75,32)
circle(15,140)
circle(65,47)
end_fill()
end_fill()

up()
setheading(-110)
forward(4)
down()
# peacock4
begin_fill()
setheading(140)
circle(-70,70)
circle(-28,145)
circle(-85,27)
setheading(54)
circle(50,50)
circle(-30,60)
setheading(-140)
circle(50,35)
setheading(74)
circle(100,36)
setheading(-82)
circle(-70,35)
setheading(92)
circle(55,50)
circle(-35,65)
setheading(-135)
circle(125,70)
setheading(140)
circle(-80,50)
setheading(-94)
circle(100,70)
end_fill()
hideturtle()

pu()
right(30)
forward(100)
right(90)
forward(420)
# naam
color("#ccccff")
write("Jay Shree Krishna",font=
      ("Arial", 35, "bold"))
done()
Output:-
Lord Krishna Painting Using Python Turtle
Video Link:- Click me
Aasha he ki apne python turtle ka use karke successfully Lord Krishna ki painting banali hogi.
Humari Website par aane ke liye dhanywaad!

एक टिप्पणी भेजें

0 टिप्पणियाँ
* Please Don't Spam Here. All the Comments are Reviewed by Admin.