Skip to main content

optical illusion python code

  Optical Illusion Using Python Turtle.

Hello Guys, In this blog I will let you know how to make optical illusions using python turtle.

What is an optical illusion??   

Optical illusions are images or pictures that we perceive differently than they really are. Put another way, optical illusions occur when our eyes send information to our brains that tricks us into perceiving something that does not match reality.  


   Steps to be followed :-  


 1.Open Vs-Code 

 2.Import Python turtle ๐Ÿข  

 3.Start Making turtle Graphics [๐Ÿ‘‡๐Ÿผ Video ]  



                               Image-1



           Image-2


                      #Source Code

#Making Background using python turtle
import turtle
t=turtle.Turtle()
t.hideturtle()
t.speed(0)
t.pensize(2)
turtle.tracer(10)
turtle.bgcolor("black")
for i in range(10000):
 for colours in ("white" , "black" , ) :
   t.color(colours)
   t.right(3)
   t.circle(i)
   t.right(30)
   t.forward(0.5)
turtle.done()

Comments

Popular posts from this blog

how to install turtle in python in vs code

Hello ๐Ÿ‘‹ Guys in this blog I will tell you about, สœแดแดก แด›แด ษชแดแด˜แดส€แด› แด˜สแด›สœแดษด แด›แดœส€แด›สŸแด‡ แดษด แด ๊œฑ แด„แดแด…แด‡ ๐”ฝ๐• ๐•๐•๐• ๐•จ ๐•ฅ๐•™๐•– ๐•—๐• ๐•๐•๐• ๐•จ๐•š๐•Ÿ๐•˜ ๐•ค๐•ฅ๐•–๐•ก๐•ค 1. Open VS-CODE 2. Create a PYTHON file 3. Open a  terminal 4.   ✍️ in terminal pip install PythonTurtle 5. Press Enter 6. Open the python file ๐Ÿ—ƒ️ 7. Write import turtle   ๐—”๐—ณ๐˜๐—ฒ๐—ฟ ๐—ณ๐—ผ๐—น๐—น๐—ผ๐˜„๐—ถ๐—ป๐—ด ๐˜๐—ต๐—ถ๐˜€ ๐˜€๐˜๐—ฒ๐—ฝ๐˜€ ๐˜†๐—ผ๐˜‚ ๐—ต๐—ฎ๐˜ƒ๐—ฒ ๐˜€๐˜‚๐—ฐ๐—ฐ๐—ฒ๐˜€๐˜€๐—ณ๐˜‚๐—น๐—น๐˜† ๐—ถ๐—บ๐—ฝ๐—ผ๐—ฟ๐˜๐—ฒ๐—ฑ PYTHON TURTLE . Visit My channel:-  CODE GYANI

spider man code in python

Making Spider-Man Using python turtle Hello Guys, In this blog I will let you know how to make Spider-Man Using python turtle. On-Demand of one of our subscribers. You can also suggest Any Graphics, in the Comment box.                                    Refer to the video for a tutorial             Refer this      ๐Ÿ‘‡๐Ÿผ                                             #Result #Source Code import turtle turtle.bgcolor ( ' black ' ) p = turtle.Turtle () wn = turtle.Screen () p.pencolor ( ' red ' ) p.hideturtle () #curve01 def curve01 ( a , d ):     for i in range ( d ) :         p.right ( a )         p.forward ( 1 ) #making eye p.width ( 15 ) p.penup () p.right ( 90 ) p.forward ( 85 ) p.l...

naruto python code

    #Naruto Using Python turtle     Hello Guys, In this blog I will let you know how to make Naruto Using a python turtle.                                   Refer to the video for a tutorial. ๐Ÿ‘‡๐Ÿผ                                                              #Result #Source Code import turtle def   naruto ():   p = turtle.Turtle ()   p.pencolor ( " red " )   p.pensize ( 8 )   p.hideturtle ()   turtle.tracer ( 5 )   p.pencolor ( ' black ' )   wn = turtle.Screen ()   wn.bgpic ( " sf.gif " )   p.left ( 13 )   p.speed ( 8 )   p.fillcolor ( " yellow " )   p.begin_fill ()   p.penup ()   p.forward ( 190 )   p.pendown () #Hair   p.right ( 25 ) ...

Iron man using pyton

    HOW TO MAKE  IRON MAN  USING    PYTHON TURTLE Hello Guys,  In this Blog  I   will tell you   how to  make   your  favorite   superhero.                                                                   #Result IRON MAN - MARVEL STUDIO                                             #Source Code #Iron man With python turtle from turtle import * bgpic (" lk.png ") # function for curve def curve01 ( a , d ):     for i in range ( d ):         right ( a )         forward ( 1 ) def curve02 ( a , d ):     for i in range ( d ):         left ( a )    ...

Afghanistan flag using python

   HOW TO MAKE AFGHANISTAN FLAG USING PYTHON TURTLE Hello Guys, I will tell you how to make the Afghanistan flag using python turtle in this blog. Follow the given instruction in the video. - import turtle as t  #so you don't have to write trutle many times - then make a rectangle color Green. - then make two rectangles one after the other inside the   Green rectangle and fill them with red and black colors respectively. - Now you are almost done with the flag and at last, you have to make the  Emblem of Afghanistan. - It is tough๐Ÿ™ƒ  to make an Afghanistan emblem so, take the gif of the  Emblem of Afghanistan and display it at last.                                  #Result -------------------------The End-------------------------                      #SOURCE CODE           #flag   ...

India python turtle

    HOW TO  WRITE INDIA  USING PYTHON?? Hello Guys, in this blog I will tell you how to write INDIA,  1.  import turtle   on your Vs-Code. 2. Follow the given instruction in the video.๐Ÿ‘‡๐Ÿผ INDIA                                           #SOURCE CODE import turtle as t t . pencolor ( ' white ' ) t . pensize ( 3 ) t . bgcolor ( ' #000080 ' ) #allignments t . penup () t . forward ( 58 ) t . left ( 90 ) t . forward ( 75 ) t . left ( 90 ) t . pendown () #function for curve def curve01 ( a , d ):     for i in range ( d ):         t . right ( a )         t . forward ( 1 ) def curve02 ( a , d ):     for i in range ( d ):         t . left ( a )         t . forward ( 1 ) #dddddddddd...