Skip to main content

Posts

Showing posts from September, 2021

Akemi Homura(Anime Character) Drawing using Python Turtle Programming | Simple Python Turtle Graphics | Vast Coding

Akemi Homura(Anime Character) Drawing using Python Turtle Programming | Simple Python Turtle Graphics | Vast Coding   Here is the Source Code:- Wait at least 30seconds after running this code,it will draw anime character after 30seconds automatically. import turtle as te import time WriteStep = 15 # Sampling times of Bessel function Speed = 5 Width = 600 # Interface width Height = 500 # Interface height Xh = 0 # Record the handle of the previous Bessel function Yh = 0 def Bezier(p1, p2, t): # First order Bessel function     return p1 * (1 - t) + p2 * t def Bezier_2(x1, y1, x2, y2, x3, y3): # Second-order Bessel function     te.goto(x1, y1)     te.pendown()     for t in range(0, WriteStep + 1):         x = Bezier(Bezier(x1, x2, t / WriteStep),                    Bezier(x2, x3, t / WriteStep), t / WriteStep)         y = Bezier(Bezier(y1, y2, t / WriteStep),                    Bezier(y2, y3, t / WriteStep), t / WriteStep)         te.goto(x, y)     te.penup() def Bezier_3(x1, y1, x2,

Make a Robot using Python | Simple Python Turtle Graphics | Vast Coding

Make a Robot using Python | Simple Python Turtle Graphics | Vast Coding Here is the Source Code:-  import turtle as t def rectangle(horizontal, vertical, color):     t.pendown()     t.pensize(1)     t.color(color)     t.begin_fill()     for counter in range(1, 3):         t.forward(horizontal)         t.right(90)         t.forward(vertical)         t.right(90)     t.end_fill()     t.penup() t.penup() t.speed('slow') t.bgcolor('black') # feet t.goto(-100, -150) rectangle(50, 20, 'blue') t.goto(-30, -150) rectangle(50, 20, 'blue') # legs t.goto(-25, -50) rectangle(15, 100, 'yellow') t.goto(-55, -50) rectangle(-15, 100, 'yellow') # body t.goto(-90, 100) rectangle(100, 150, 'red') # arms t.goto(-150, 70) rectangle(60, 15, 'yellow') t.goto(-150, 110) rectangle(15, 40, 'yellow') t.goto(10, 70) rectangle(60, 15, 'yellow') t.goto(55, 110) rectangle(15, 40, 'yellow') # neck t.goto(-50, 120) rectangle(15, 20

Snake Game | Simple Snake Game written in Python using the PyGame Library.

Snake Game | Simple Snake Game written in Python using the PyGame Library. Vast Coding   Here is the Source Code:- """ Snake Eater Made with PyGame """ import pygame, sys, time, random # Difficulty settings # Easy      ->  10 # Medium    ->  25 # Hard      ->  40 # Harder    ->  60 # Impossible->  120 difficulty = 25 # Window size frame_size_x = 720 frame_size_y = 480 # Checks for errors encountered check_errors = pygame.init() # pygame.init() example output -> (6, 0) # second number in tuple gives number of errors if check_errors[1] > 0:     print(f'[!] Had {check_errors[1]} errors when initialising game, exiting...')     sys.exit(-1) else:     print('[+] Game successfully initialised') # Initialise game window pygame.display.set_caption('Snake Eater') game_window = pygame.display.set_mode((frame_size_x, frame_size_y)) # Colors (R, G, B) black = pygame.Color(0, 0, 0) white = pygame.Color(255, 255, 255) red = py

Wish Good Night using Python | Python Turtle | Simple Python Project

Wish Good Night using Python|Python Turtle|Simple Python Project|  Vast Coding Here is the Source Code :-  import turtle import random # window setup win = turtle.Screen() win.setup(width=800,height=600) win.bgcolor('black') colors = ['red','blue','orange','yellow','magenta','purple','peru','ivory','dark orange'] # Turtle objects moon = turtle.Turtle() moon.hideturtle() star = turtle.Turtle() star.speed(0) star.hideturtle() text = turtle.Turtle() text.speed(6) text.hideturtle() # Functions def draw_moon(pos,color): x,y = pos moon.color(color) moon.begin_fill() moon.penup() moon.goto(x,y) moon.pendown() moon.circle(50) moon.end_fill() def stars(x,y,color,length): star.color(color) star.penup() star.goto(x,y) star.pendown() star.begin_fill() for i in range(5): star.forward(length) star.right(144) star.forward(length) star.end_fill() def random_pos(): return random.ra

3D Design using Python Turtle Graphics | Simple Python Project | Python Turtle

Beautiful design using Python Turtle Graphics | Simple Python Project | Python Turtle | Vast Coding Here is the Source Code:- import turtle as t t.speed(0) t.bgcolor('black') t.pencolor('purple') for i in range(220): t.rt(i) t.circle(120,i) t.fd(i) t.rt(90) t.done() OUTPUT:- OUTPUT NOTE:- Please help me to grow my Youtube Channel called " Vast Coding "

How to Propose Someone using Python | Make Red Rose using Python Turtle Graphics | Vast Coding

How to Propose Someone using Python 😂 | Make Red Rose using Python Turtle Graphics | Vast Coding Python Code To Draw Red Rose SOURCE CODE:- import turtle # Set initial position turtle.penup () turtle.left (90) turtle.fd (200) turtle.pendown () turtle.right (90) # flower base turtle.fillcolor ("red") turtle.begin_fill () turtle.circle (10,180) turtle.circle (25,110) turtle.left (50) turtle.circle (60,45) turtle.circle (20,170) turtle.right (24) turtle.fd (30) turtle.left (10) turtle.circle (30,110) turtle.fd (20) turtle.left (40) turtle.circle (90,70) turtle.circle (30,150) turtle.right (30) turtle.fd (15) turtle.circle (80,90) turtle.left (15) turtle.fd (45) turtle.right (165) turtle.fd (20) turtle.left (155) turtle.circle (150,80) turtle.left (50) turtle.circle (150,90) turtle.end_fill () # Petal 1 turtle.left (150) turtle.circle (-90,70) turtle.left (20) turtle.circle (75,105) turtle.setheading (60) turtle.circle (80,98) turtle.circle (-90,40) # Petal 2 turtle.left (180)

Peppa Pig Cartoon Drawing using Turtle Grpahics in Python | Simple Python Project | Vast Coding

Peppa Pig Cartoon Drawing using Turtle Grpahics in Python | Simple Python Project | Vast Coding (Also Subscribe My Youtube Channel :- Vast Coding ) SOURCE CODE:- import turtle as t t.pensize(4) t.hideturtle() t.colormode(255) t.color((255,155,192),"pink") t.setup(840,500) t.speed(10) t.pu() t.goto(-100,100) t.pd() t.seth(-30) t.begin_fill() a=0.4 for i in range(120):     if 0<=i<30 or 60<=i<90:         a=a+0.08         t.lt(3)          t.fd(a)      else:         a=a-0.08         t.lt(3)         t.fd(a) t.end_fill() t.pu() t.seth(90) t.fd(25) t.seth(0) t.fd(10) t.pd() t.pencolor(255,155,192) t.seth(10) t.begin_fill() t.circle(5) t.color(160,82,45) t.end_fill() t.pu() t.seth(0) t.fd(20) t.pd() t.pencolor(255,155,192) t.seth(10) t.begin_fill() t.circle(5) t.color(160,82,45) t.end_fill() t.color((255,155,192),"pink") t.pu() t.seth(90) t.fd(41) t.seth(0) t.fd(0) t.pd() t.begin_fill() t.seth(180) t.circle(300,-30) t.circle(100,-60) t.circle(80,-100) t.circle