Skip to main content

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:

pip install ip1tricks

🎨 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.
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

2. The Vibrant Spiral 🌀

Spirals are created by drawing and turning, but slightly increasing the size or angle each time.

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


Metadata

Release files for ip1tricks 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ip1tricks 0.1.2
File Size Uploaded Provenance Actions
ip1tricks-0.1.2.tar.gz 4.8 kB Without provenance Details for ip1tricks-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ip1tricks 0.1.2
File Interpreter ABI Platform Actions
ip1tricks-0.1.2-py3-none-any.whl Python 3 none any Details for ip1tricks-0.1.2-py3-none-any.whl

Total release size: 10.1 kB

Release files / ip1tricks-0.1.2.tar.gz

Download URL ip1tricks-0.1.2.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ceca420d9d6786c201f94061f7d4a5077d4d3474bdbcceee7316752cb721a649
BLAKE2b-256 checksum
How to use checksums
9f2cad22805b4b2b8af86bc6726464767cbea3cfceba73b4bb56dd97fcc62938
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / ip1tricks-0.1.2-py3-none-any.whl

Download URL ip1tricks-0.1.2-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
14752fd804f1cba20c9ee279d3bb00a1225fc3d0a6f1be7a47425697ad8c46bf
BLAKE2b-256 checksum
How to use checksums
a41e5acd2dfdd8bc8cf2d0ea4a018ff14be51c1ecd879538994b30bc60be9752
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Security for ip1tricks 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page