PyreFrame is a wireframe 3D graphics engine which uses turtle graphics. It is highly inefficient, unrealistic, and does not support rotation of any kind.
Project description
PyWireframe
PyWireframe is a Python library for creating 3D wireframe graphics. It's highly inefficient (it uses turtle graphics) and doesn't support rotation.
Installation
Use the package manager pip to install PyWireframe.
pip install PyWireframe
Usage
Shapes: PyWireframe has several shape functions built in, but you can also define your own. Currently built-in shapes are:
cube(x, y, z, size) # a cube
cuboid(x, y, z, length, height, breadth) # a cuboid
pyramid3(x, y, z, size) # a 3 sided pyramid
pyramid4(x, y, z, size) # a 4 sided pyramid
You can also define your own shapes with the
line(x1, y1, z1, x2, y2, z2)
function, e.g
def square:
line(0, 0, 0, 100, 0, 0)
line(0, 0, 0, 0, 100, 0)
line(100, 100, 0, 100, 0, 0)
line(100, 100, 100, 0, 0, 0)
Some syntax:
import PyWireframe
PyWireframe.start() # starts PyWireframe
PyWireframe.exit() # closes the PyWireframe window
PyWireframe.refresh() 3
PyWireframe.cube(0, 0, 0, 100) # draws a cube with the left-bottom-front corner is at 0, 0, 0 and size 100
PyWireframe.CameraX += 1 # moves the camera forward 1 on the z axis
PyWireframe.FocalLength += 1 # changes the Focal Length by 1
Example code:
import PyWireframe
def redraw():
PyreFrame.refresh()
cube(0, 0, 0, 100)
pyramid4(0, 100, 0, 100)
License
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
PyWireframe-0.1.2.tar.gz
(2.6 kB
view hashes)
Built Distribution
Close
Hashes for PyWireframe-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fbf0e2f43a724076bce101ef89daace961c58d38cf45cafb8ac49da328af78fe |
|
MD5 | b0d06316cf8648b89b82ee376312ec39 |
|
BLAKE2b-256 | 6ba0152a4336bf04211b8549a525092843cdfa65f5d141cdc92b541be2e627cb |