Skip to main content

A Python module for designing generative crystal art

Project description

CrysplanarArt 3D 💎

"3D crystals from 2D planes"

CrysplanarArt 3D is a Python module for designing stunning generative crystal art using simple and intuitive tools. Built on turtle and pygame, it gives complete creative freedom with minimal code.


🖼️ Gallery

The Four Elements

THE FOUR ELEMENTS

Galaxy Collision — Good vs Evil

GALAXY COLLISION

Crystal Rod

CRYSTAL

Hexa Pattern

HEXA PATTERN

Generative Art

GENERATIVE ART

Other Designs

ART (2) NEW ART Screenshot 2026-05-18 132512 art 1 CRYS

📦 Installation

pip install crysplanar

⚡ Quick Start

from crysplanar import crysplanar

cp = crysplanar()
cp.Board('My Art', 'black')
cp.ArtPencil(size=1, hidepencil=True)

cp.crystalmaker(
    sidesno=6,
    crystalno=24,
    crayon=['blue', 'red', 'green', 'yellow', 'cyan', 'magenta'],
    sidelen=100,
    spacing=10,
    x=list(range(25)),
    y=list(range(25))
)

🛠️ Tools

Tool Description
Board Setup the art canvas
ArtPencil Configure the drawing pen
placer Move ArtPencil to any position
crystalmaker Generate crystal structures
drawshape Draw basic geometric shapes
bgmusic Add background music
picback Set background image

💎 crystalmaker

The flagship tool of CrysplanarArt 2D.

cp.crystalmaker(sidesno, crystalno, crayon, sidelen, spacing, x, y)
Parameter Description
sidesno Number of sides of the crystal (3=triangle, 6=hexagon)
crystalno Length of the crystal
crayon List of colors for the crystal
sidelen Length of each side in pixels
spacing Spacing between crystal layers
x / y Positional coordinate lists

Examples

# Fire Crystal 🔥
cp.crystalmaker(sidesno=3, crystalno=12,
                crayon=['red', 'gold', 'orange'],
                sidelen=100, spacing=10,
                x=list(range(12)),
                y=list(range(12)))

# Ice Crystal ❄️
cp.crystalmaker(sidesno=4, crystalno=24,
                crayon=['navy', 'royalblue', 'cyan'],
                sidelen=100, spacing=10,
                x=list(range(25)),
                y=list(range(25)))

# Rainbow Crystal 🌈
cp.crystalmaker(sidesno=6, crystalno=24,
                crayon=['blue','red','green','yellow','cyan','magenta'],
                sidelen=100, spacing=10,
                x=list(range(25)),
                y=list(range(25)))

🔷 drawshape

Draw basic geometric shapes anywhere on the canvas.

ds = crysplanar.drawshape()

ds.triangle(sidelen=100, rotate=False, fillcolor='red')
ds.square(sidelen=100, fillcolor='blue')
ds.rectangle(width=200, height=100, fillcolor='green')
ds.pentagon(sidelen=100, fillcolor='purple')
ds.round(radius=50, fillcolor='yellow', angle=360)
ds.polygon(sidesno=8, sidelen=100, fillcolor='cyan')

🎵 bgmusic

Add background music to your art canvas.

cp.bgmusic('music.mp3', repeat=True)

📋 Requirements

  • Python 3.x
  • turtle
  • pygame
  • ghostscript
pip install pygame
pip install ghostscript

📜 License

MIT License — free to use, modify and share with credit.


👨‍💻 Author

Made with 🧠 and 🐢 Born from a single line: circle(100, 190)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

crysplanar-1.0.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crysplanar-1.0-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file crysplanar-1.0.tar.gz.

File metadata

  • Download URL: crysplanar-1.0.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for crysplanar-1.0.tar.gz
Algorithm Hash digest
SHA256 f949da16e250802f9ee5f2a0f85f6e72c8603913dc12cf5780d1bc2b3ef40cfa
MD5 f0572a04d82caf90365a93bb1408e0c2
BLAKE2b-256 8d6b75b31804c20e047bbc14b4b1cda7781528d5ef7901cc1930bd75bf527b8b

See more details on using hashes here.

File details

Details for the file crysplanar-1.0-py3-none-any.whl.

File metadata

  • Download URL: crysplanar-1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for crysplanar-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 768a0a3d0929e8efc76bc4e8013aa2f5de68b599703d22aaa87f96f864715ff3
MD5 41c59ee0ab8ff4d82d9cbead94ab526e
BLAKE2b-256 df7d180a1546d5f776d8da0a75c530bbae20e01410ae8fd6cc677a99dcf7c4f7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page