Skip to main content

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

MIT

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)

Uploaded Source

Built Distribution

PyWireframe-0.1.2-py3-none-any.whl (4.9 kB view hashes)

Uploaded Python 3

Supported by

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