Metadata-Version: 2.4
Name: ip1tricks
Version: 0.1.1
Summary: A simplified wrapper for Python's turtle module, perfect for beginners.
Author-email: Scrol <shanrsjmax@gmail.com>
Project-URL: Homepage, https://github.com/scr-ol/ip1tricks
Project-URL: Bug Tracker, https://github.com/scr-ol/ip1tricks/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# ip1tricks 🐢

**A simplified, beginner-friendly wrapper for Python's Turtle graphics.**

Created by **Scrol**.

---

## 🌟 Introduction

Welcome to `ip1tricks`! If you've ever wanted to create beautiful digital art with Python but found the standard `turtle` module a bit overwhelming, this library is for you. We've simplified the commands so you can focus on your creativity.

Whether you're a Python newbie or a seasoned coder looking for a quick way to draw shapes, `ip1tricks` makes it easy to create complex patterns like flowers, spirals, and polygons with just a few lines of code.

---

## 🚀 Installation

You can install `ip1tricks` directly from source:

```bash
pip install .
```

---

## 🎨 Getting Started (For Newbies)

In Python Turtle, you control a small "turtle" on a screen. Think of it like a robot with a pen attached to its tail. As the robot moves, it leaves a trail.

### The Basic Workflow:
1. **Import the tools**: `from ip1tricks import *`
2. **Setup**: `instant()` to make it draw fast.
3. **Move and Draw**: Use commands like `line()`, `turn()`, and `arc()`.
4. **Finish**: `hide()` the turtle and `finish()` to keep the window open.

---

## 📚 Core Concepts & Theory

### 1. The Coordinate System
The screen is a grid. The center is `(0, 0)`.
- Moving **Forward** means moving in the direction the turtle is facing.
- **Turning** changes the turtle's direction (Heading).

### 2. Angles and Shapes
- A full circle is **360 degrees**.
- To draw a **Square**, you turn 90 degrees four times (360 / 4).
- To draw a **Triangle**, you turn 120 degrees three times (360 / 3).
- **The Rule**: To draw a polygon with `n` sides, you turn `360 / n` degrees at each corner.

### 3. How Arcs Work
An arc is a piece of a circle. We calculate the `circumference` (the total distance around a circle) using `2 * π * radius`. To make the drawing look smooth, we break the arc into many tiny straight lines.
- **Radius**: How big the circle would be.
- **Angle**: How much of the circle to draw (e.g., 180 for a semi-circle).

---

## 🛠 Function Reference

| Function | What it does | Example |
| :--- | :--- | :--- |
| `move(x, y)` | teleports the turtle to (x, y) without drawing. | `move(100, 50)` |
| `line(length)` | Draws a straight line forward. | `line(100)` |
| `turn(angle)` | Turns left by a number of degrees. | `turn(90)` |
| `polygon(len, sides)` | Draws a shape with equal sides. | `polygon(50, 6)` |
| `arc(radius, angle)` | Draws a curved line. | `arc(100, 60)` |
| `circle2(radius)` | Draws a full circle. | `circle2(50)` |
| `setcolor(c)` | Changes the pen color. | `setcolor('red')` |
| `instant()` | Makes the drawing happen immediately. | `instant()` |
| `accelerate()` | Same as `instant()`, for faster drawing! | `accelerate()` |
| `hide()` | Makes the turtle icon disappear. | `hide()` |
| `finish()` | Stops the window from closing. | `finish()` |

---

## 🌈 Examples

### 1. The Classic Flower 🌸
This example uses overlapping `arc()` commands to create a beautiful floral pattern.

**How it works:**
1. We draw two arcs to create one "petal".
2. We turn slightly (36 degrees).
3. We repeat this 10 times (10 * 36 = 360) to complete the flower.

```python
from ip1tricks import *

instant()
setcolor('red')

for i in range(10):
    # Draw a petal
    arc(100, 60)
    turn(120)
    arc(100, 60)
    turn(120)
    
    # Rotate for the next petal
    turn(36)

hide()
finish()
```

![Flower Pattern](docs/images/flower.png)

### 2. The Vibrant Spiral 🌀
Spirals are created by drawing and turning, but slightly increasing the size or angle each time.

```python
from ip1tricks import *

instant()

for i in range(100):
    setcolor(['red', 'purple', 'blue', 'green'][i % 4])
    line(i * 2)
    turn(91)

hide()
finish()
```

![Spiral Pattern](docs/images/spiral.png)

---
