{"id":15581193,"url":"https://github.com/shreyamalogi/spirograph","last_synced_at":"2025-04-24T02:49:40.508Z","repository":{"id":53622138,"uuid":"349458810","full_name":"shreyamalogi/Spirograph","owner":"shreyamalogi","description":"\"Symmetrical Magic: Shreya's Spirograph with Vibrant Colors! 🌀🎨","archived":false,"fork":false,"pushed_at":"2023-10-22T12:03:11.000Z","size":4020,"stargazers_count":17,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-24T02:49:39.684Z","etag":null,"topics":["begginer-friendly","python","shreyamalogi-mentorship","turtle"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shreyamalogi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-19T14:52:52.000Z","updated_at":"2024-11-01T07:59:24.000Z","dependencies_parsed_at":"2024-10-02T19:42:00.400Z","dependency_job_id":"554e48fb-c9ee-4b94-bc9a-1697471d638c","html_url":"https://github.com/shreyamalogi/Spirograph","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shreyamalogi%2FSpirograph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shreyamalogi%2FSpirograph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shreyamalogi%2FSpirograph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shreyamalogi%2FSpirograph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shreyamalogi","download_url":"https://codeload.github.com/shreyamalogi/Spirograph/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250552035,"owners_count":21449161,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["begginer-friendly","python","shreyamalogi-mentorship","turtle"],"created_at":"2024-10-02T19:41:56.856Z","updated_at":"2025-04-24T02:49:40.447Z","avatar_url":"https://github.com/shreyamalogi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spirograph 🌀\n\n🌈 Welcome to the Begginer-friendly Spirograph Drawing project\n\nCrafted and taught by **Shreya Malogi!** 🌐\n\n\n\n[![GitHub stars](https://img.shields.io/github/stars/shreyamalogi/spirograph.svg?style=social)](https://github.com/shreyamalogi/spirograph/stargazers)\n\n### Project Details: 🎨🐢📅✍️\n\n- **Functionality:** Creates vibrant and mesmerizing spirograph drawings using Python's Turtle module.\n- **Tech Stack:** `Python`, `turtle`, `random`\n- **Author:** [@shreyamalogi](https://github.com/shreyamalogi/)\n- **Year of Project:** 2021\n\n---\n\n# Table of Contents 📚\n\n1. [Introduction](#introduction-)\n2. [Prerequisites](#prerequisites-%EF%B8%8F)\n3. [Installation](#installation-)\n4. [Running the Script](#running-the-script-%EF%B8%8F)\n5. [Understanding the Code](#understanding-the-code-)\n6. [Customizing Your Spirograph](#customizing-your-spirograph-)\n7. [Contribution](#contribution--show-your-support-star-this-)\n8. [License](#license-%EF%B8%8F)\n\n## Introduction 🎨\n\nWelcome to Spirograph Drawing! This Python script allows you to create vibrant and mesmerizing spirograph drawings using the Turtle module. Get ready to unleash your creativity with a few lines of code! 🌀🌈\n\n## Prerequisites 🛠️\n\nBefore you dive into the world of spirographs, make sure you have Python installed on your machine. If not, you can download it [here](https://www.python.org/downloads/).\n\n## Installation 🐢\n\nNo additional modules are required for this script. Just make sure you have Python installed.\n\n## Running the Script ▶️\n\n1. Open the script in your favorite Python environment.\n2. Run the script. This will launch the Turtle graphics window.\n\n## Understanding the Code 🤓\n\nLet's break down the provided Python code for the Spirograph Drawing script:\n\n```python\nimport turtle as t\nimport random\n\nmyrtle = t.Turtle()\nt.colormode(255)\n\ndef random_color():\n    r = random.randint(0, 255)\n    g = random.randint(0, 255)\n    b = random.randint(0, 255)\n    color = (r, g, b)\n    return color\n\ndef draw_spirograph(size_of_gap):\n    for _ in range(int(360 / size_of_gap)):\n        myrtle.color(random_color())\n        myrtle.circle(100)\n        myrtle.setheading(myrtle.heading() + size_of_gap)\n\ndraw_spirograph(5)\n```\n\n### Code Explanation:\n\n1. **Importing Libraries:**\n   ```python\n   import turtle as t\n   import random\n   ```\n   - `turtle` is a module in Python that provides a way to create simple graphics.\n   - `random` is a module that provides functions for generating random numbers.\n\n2. **Creating a Turtle:**\n   ```python\n   myrtle = t.Turtle()\n   t.colormode(255)\n   ```\n   - `myrtle` is an instance of the `Turtle` class, which is used for drawing.\n   - `t.colormode(255)` sets the color mode to use RGB values ranging from 0 to 255.\n\n3. **Generating Random Colors:**\n   ```python\n   def random_color():\n       r = random.randint(0, 255)\n       g = random.randint(0, 255)\n       b = random.randint(0, 255)\n       color = (r, g, b)\n       return color\n   ```\n   - The `random_color` function generates a random RGB color and returns it as a tuple.\n\n4. **Drawing Spirograph:**\n   ```python\n   def draw_spirograph(size_of_gap):\n       for _ in range(int(360 / size_of_gap)):\n           myrtle.color(random_color())\n           myrtle.circle(100)\n           myrtle.setheading(myrtle.heading() + size_of_gap)\n   ```\n   - The `draw_spirograph` function uses a loop to draw circles in a spirograph pattern.\n   - `myrtle.color(random_color())` sets the turtle's color to a random color.\n   - `myrtle.circle(100)` draws a circle with a radius of 100 units.\n   - `myrtle.setheading(myrtle.heading() + size_of_gap)` changes the heading of the turtle, creating the spirograph effect.\n\n5. **Executing the Drawing:**\n   ```python\n   draw_spirograph(5)\n   ```\n   - This line calls the `draw_spirograph` function with a `size_of_gap` of 5, determining the gap between each circle in the spirograph.\n\nThe script, when executed, will create a visually appealing spirograph drawing with randomized colors. Adjusting the parameters can lead to various spirograph patterns.\n## Customizing Your Spirograph 🎨\n\nFeel free to experiment with the script! Adjust the `size_of_gap` parameter in the `draw_spirograph` function to change the gap between each circle in the spirograph. You can also modify colors, circle radii, and other parameters to create various spirograph patterns.\n\n## Contribution- Show Your Support (Star This) ⭐🌟📜✨\n\nEnjoying the magic of spirographs? Contribute to this creative journey and make it even more enchanting. Don't forget to star the project! ⭐🌟\n\n## License ⚖️\n\nThis project is enchanted under the spell of the MIT License. Share the magic responsibly!\n\n**MIT License**\n\nCopyright (c) 2021 Shreya Malogi\n\nStay Enchanted! 🌍💙\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshreyamalogi%2Fspirograph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshreyamalogi%2Fspirograph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshreyamalogi%2Fspirograph/lists"}