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
Galaxy Collision — Good vs Evil
Crystal Rod
Hexa Pattern
Generative Art
Other Designs
📦 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file crysplanar-1.2.tar.gz.
File metadata
- Download URL: crysplanar-1.2.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32babc4e18e52b28b48e653b06a526e1ad15b264ce8ff79a32733c19c9e0e747
|
|
| MD5 |
964e70b436bac67d86988b3648fcf4bd
|
|
| BLAKE2b-256 |
4c03cbdcff835560deb564633c1afc6cf3a46c2a4a963f2c02409f27dcefc2df
|
File details
Details for the file crysplanar-1.2-py3-none-any.whl.
File metadata
- Download URL: crysplanar-1.2-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0515f897dd416dc69370e339f97df23c2ee96502c29dca461d026a1560fc4c04
|
|
| MD5 |
45e0acf06e0f8993bf6759615c43b886
|
|
| BLAKE2b-256 |
040709eb29feedd82ace00f57b631820bad8c9d8b0c1ccfead0e3c37dd0505f3
|