Skip to content

"Shreya's Python canvas magic - Hirst Painting Art 🎨✨

License

Notifications You must be signed in to change notification settings

shreyamalogi/Polka-Dot-Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

The Polka Dot Generator 🎨

Welcome to the beginner-friendly project - " The Polka Dot Generator "

Crafted and taught by Shreya Malogi! 🌐

GitHub stars

Project Details: πŸ’»πŸŒπŸ“…βœοΈ

  • Functionality: Generates stunning Hirst-inspired paintings using Python's Turtle module.
  • Tech Stack: Python, turtle-GUI
  • Author: @shreyamalogi
  • Year of Project: 2021

Table of Contents πŸ“š

  1. Introduction
  2. Prerequisites
  3. Installation
  4. Running the Script
  5. Customizing Your Painting
  6. Understanding the Code

Introduction 🎨

This Python script utilizes the Turtle module to create a stunning Hirst-inspired painting. Let's embark on your artistic coding journey! πŸš€

Prerequisites πŸ› οΈ

Before you dive in, make sure you have Python installed on your machine. If not, you can download it here.

Installation 🐒

You'll need the turtle module to run this script. Install it using:

pip install PythonTurtle

Running the Script ▢️

  1. Open the script in your favorite Python environment.
  2. Run the script. This will launch the Turtle graphics window.

Customizing Your Painting 🎨

The script uses a predefined color_list variable containing RGB tuples. Feel free to customize this list to create your unique color palette. 🌈

Understanding the Code πŸ€“

Let's break down the script:

import turtle as turtle_module
import random

# ... (other imports)

turtle_module.colormode(255)
myrtle = turtle_module.Turtle()
myrtle.speed("fastest")
myrtle.penup()
myrtle.hideturtle()

color_list = [(202, 164, 109), (238, 240, 245), ... , (176, 192, 209)]

# ... (more code)

screen = turtle_module.Screen()
screen.exitonclick()
  • colormode(255): Configures Turtle to use RGB values ranging from 0 to 255.
  • Turtle(): Creates a Turtle object named myrtle.
  • speed("fastest"): Sets the drawing speed to the fastest.
  • penup(): Lifts the pen, so no drawing occurs when moving.
  • hideturtle(): Hides the turtle cursor.

Running the Painting Loop πŸ”„

The script uses a loop to draw dots on the canvas:

for dot_count in range(1, number_of_dots + 1):
    myrtle.dot(20, random.choice(color_list))
    myrtle.forward(50)

    if dot_count % 10 == 0:
        # ... (code for changing direction and position)

Exploring Your Art 🌌

The script will create a unique Hirst-inspired artwork. Experiment with colors and settings to make it your own! Enjoy the creative process! πŸŽ‰

Contribution- Show Your Support (Star This) β­πŸŒŸπŸ“œβœ¨

Feel the magic within you? Contribute to this enchanting spellbook and make it even more magical. Don't forget to star the project! ⭐🌟

License πŸ•ŠοΈ

This project is enchanted under the spell of the MIT License. Share the magic responsibly!

MIT License

Copyright (c) 2021 Shreya Malogi

Stay Enchanted! πŸŒπŸ’™

About

"Shreya's Python canvas magic - Hirst Painting Art 🎨✨

Topics

Resources

License

Stars

Watchers

Forks

Languages