Python Interactive Graphical System made during Computer Graphics classes (INE5420-2021.1)

Overview

PY-IGS - The PYthon Interactive Graphical System

PY-IGS

The PY-IGS

Installation

To install this software you will need these dependencies (with their thevelopment libraries):

  • Numba/SciPy/NumPy Compatible Setup (https://numba.readthedocs.io/en/stable/user/installing.html) (Use for C matrix multiplication)
  • Gtk 3.20+
  • PyGOBject Dependencies (libgirepository1.0-dev gcc libcairo2-dev pkg-config python3-dev gir1.2-gtk-3.0)
  • Python 3.8+
  • Poetry (To install it, please visit the official install instructions)

After install them, install python dependencies with:

poetry install

How to Use

Executing

In order to execute this program, run the following command:

poetry run python3 py_igs

Navigation

To navigate through the world, you can use the mouse or the navigation widget.

To move with the mouse, simply click over the viewport and drag your cursor over the screen. The amplitude of this movement is inverse to the scale of the world, enabling a smooth view in your screen.

If you want to use the navigation widget, you need to click on the buttons that are displayed on the navigation grid in the left panel. You can configure the amplitude of this movement with the "Pan Step" field (world units).

For zooming, you can use your mouse scroll or the + and - buttons on the navigation grid. You can configure the zoom ammount with the "Zoom Step" slider (from 0,01% up to 50% each step)

You can also rotate the Window using the upper left and upper right buttons on navigation grid.

Navigation Widget

The navigation widget

Adding Objects

To add an object, you need to click on the "Add" button located in the objects widget. A dialog will popup in your screen.

In this dialog, insert the object name (unique in the scene) then insert the points coordinates of your object. You can select the type of the object by changing the active tab of the dialog. The drawing color can also be defined in this dialog. There is an option to fill wireframes too, just check the filled option when adding the object.

You can also input raw values at the "Text" tab. To use it, declare points using this format: (x1, y1), (x2, y2), ... (Obs: New lines are not allowed).

After that, click on the save button. The object will appear on the world at the given coordinates.

Adding an object

Adding an object

Editing Objects (Transforms)

Clicking in the edit button (in the objects widget) will open the editing dialog. In this window, you can define 3 transformations to apply on the object. They are: Translation, Rotation and Scaling. The translation will move the object over the world. The rotation will rotate the object around a given point that can be the world origin, the object center or a point that you specify. The scale will scale the objects in a "natural" way, i.e., based on the object center.

All transformations are stored in a list that will be merged when applying these transformations to the object.

Editing an object

Editing an object

Removing Objects

Select an object of the object list and then press the remove button in the objects widget. The object will disappear.

Objects Widget

The objects widget

Window Clipping

Currently we support 3 methods for Window clipping, they are:

  • None
  • Cohen-Sutherland
  • Liang-Barsky

To choose it, select the desired method in the Clipping Method option in the Window widget.

Window Widget

The window widget

Import/Export Scenes (Wavefront Object)

In the menu bar, you can select the Scene, then select Open to import objects. A file chooser will pop up and the you need to select the file to import.

To export your scene, click on Scene, then select Save As. Then define were you want to save your .obj (Model) file and then select a location for the .mtl (Materials) file.

Example Files

In the example/objects folder you can find many models that were utilized to test Py-Igs functionalities.


About

Made by Enzo Coelho Albornoz and Gabriel Soares Flores.

Software developed for the Computer Graphics (INE5420-2021.1) course. This course is part of our graduation in Computer Science at the Federal University of Santa Catarina (UFSC).

Window Widget

Made in UFSC

You might also like...
Izy - Python functions and classes that make python even easier than it is

izy Python functions and classes that make it even easier! You will wonder why t

Script that creates graphical representations of Julia an Mandelbrot sets.

Julia and Mandelbrot Picture Maker This simple functions create simple plots of the Julia and Mandelbrot sets. The Julia set require the important par

Macros in Python: quasiquotes, case classes, LINQ and more!

MacroPy3 1.1.0b2 MacroPy is an implementation of Syntactic Macros in the Python Programming Language. MacroPy provides a mechanism for user-defined fu

Python Classes Without Boilerplate

attrs is the Python package that will bring back the joy of writing classes by relieving you from the drudgery of implementing object protocols (aka d

Simple but maybe too simple config management through python data classes. We use it for machine learning.

👩‍✈️ Coqpit Simple, light-weight and no dependency config handling through python data classes with to/from JSON serialization/deserialization. Curre

This is a backport of the BaseExceptionGroup and ExceptionGroup classes from Python 3.11.

This is a backport of the BaseExceptionGroup and ExceptionGroup classes from Python 3.11. It contains the following: The exceptiongroup.BaseExceptionG

WATTS provides a set of Python classes that can manage simulation workflows for multiple codes where information is exchanged at a coarse level

WATTS (Workflow and Template Toolkit for Simulation) provides a set of Python classes that can manage simulation workflows for multiple codes where information is exchanged at a coarse level.

Simple tooling for marking deprecated functions or classes and re-routing to the new successors' instance.

pyDeprecate Simple tooling for marking deprecated functions or classes and re-routing to the new successors' instance

An extended version of the hotkeys demo code using action classes

An extended version of the hotkeys application using action classes. In adafruit's Hotkeys code, a macro is using a series of integers, assumed to be

Releases(v0.6.1)
  • v0.6.1(Aug 6, 2021)

    Changelog

    Import/Export

    • Support to export/import Bezier and B-Spline curves

    Performance

    • 🏎️ Used Numba + SciPy + Numpy to speed up matrix operations 🚀
    Source code(tar.gz)
    Source code(zip)
  • v0.6.0(Jul 27, 2021)

  • v0.5.0(Jul 27, 2021)

    Changelog

    Docs

    • Updated object edit description and screenshot.

    Curves

    • We now support curves! 🥳
    • Added Bezier 2D object type, with blending functions method

    Object Editing

    • You can now add more than three transformations per edit. You can repeat types in any order
    • Object centers keep tracks of all transformation that are in memory (Object center now follows transformations)
    Source code(tar.gz)
    Source code(zip)
  • 0.4.0(Jul 23, 2021)

    Changelog

    Docs

    • Updated docs with the new functionalities.
    • Added UFSC logo

    Clipping

    • Added Cohen-Sutherland line and wireframe clipping.
    • Added Liang-Barsky line and wireframe clipping.
    • Added Cohen Sutherland line and wireframe clipping.

    Object Creation

    • Added option to fill wireframes

    Import/Export

    • Added support for Wavefront Object file type
    Source code(tar.gz)
    Source code(zip)
  • 0.2.3(Jul 7, 2021)

  • 0.2.2(Jul 6, 2021)

    Changelog

    Object Creation

    • Added an option to use raw input with the format (x1, y1), (x2, y2), ...

    Docs

    • Update prints to inform about raw input
    Source code(tar.gz)
    Source code(zip)
  • 0.2.1(Jul 6, 2021)

  • 0.2.0(Jul 3, 2021)

    Changelog

    Objects Editing

    There is a new button that allows the user to transform the objects. These transformations are :

    • Translations
    • Scaling around object center
    • Rotations around:
      • Center of the world
      • Center of the object
      • Any point (arbitrary)

    Object Creation

    The user can now define a drawing color for an object. Simply use the color picker that appears at the object creation.

    Source code(tar.gz)
    Source code(zip)
Owner
Enzo Coelho Albornoz
Hello!!! I'm a brazilian undergrad student of Computer Science on UFSC (Universidade Federal de Santa Catarina).
Enzo Coelho Albornoz
Python script which allows for automatic registration in Golfbox

Python script which allows for automatic registration in Golfbox

Guðni Þór Björnsson 8 Dec 04, 2021
Basic repository showing how to use Hydra + Hydra launchers on SLURM cluster

Slurm-Hydra-Submitit This repository is a minimal working example on how to: setup Hydra setup batch of slurm jobs on top of Hydra via submitit-launch

Raphael Meudec 2 Jul 25, 2022
Curses frontend for Canto daemon

Canto Curses The curses (text) client for canto-daemon. Canto-daemon is required to work and is found at: http://github.com/themoken/canto-next Requir

Jack Miller 86 Dec 28, 2022
Sequence clustering and database creation using mmseqs, from local fasta files

Sequence clustering and database creation using mmseqs, from local fasta files

Ana Julia Velez Rueda 3 Oct 27, 2022
Create a program for generator Truth Table

Python-Truth-Table-Ver-1.0 Create a program for generator Truth Table in here you have to install truth-table-generator module for python modules inst

JehanKandy 10 Jul 13, 2022
World's best free and open source ERP.

World's best free and open source ERP.

Frappe 12.5k Jan 07, 2023
Transparently load variables from environment or JSON/YAML file.

A thin wrapper over Pydantic's settings management. Allows you to define configuration variables and load them from environment or JSON/YAML file. Also generates initial configuration files and docum

Lincoln Loop 90 Dec 14, 2022
HashDB Binary Ninja Plugin

HashDB Plugin (v0.1) Author: Vector 35 Inc Plugin for interacting with the OALABS HashDB service. Description: Plugin that can be used to lookup hashe

Jordan 3 Jul 30, 2022
Find all solutions to SUBSET-SUM, including negative, positive, and repeating numbers

subsetsum The subsetsum Python module can enumerate all combinations within a list of integers which sums to a specific value. It works for both negat

Trevor Phillips 9 May 27, 2022
SmartGrid - Een poging tot een optimale SmartGrid oplossing, door Dirk Kuiper & Lars Zwaan

SmartGrid - Een poging tot een optimale SmartGrid oplossing, door Dirk Kuiper & Lars Zwaan

1 Jan 12, 2022
Trusted sessions for falcon using itsdangerous.

Falcon signed sessions This project allows you to easily add trusted cookies to falcon, it works by storing a signed cookie in the client's browser us

Ward 1 Feb 08, 2022
Python script to automate the change of desktop background

wallomator Python script to automate the change of desktop background A python script that automates the process of changing the desktop background. I

Mohammed Haaris Javed 10 Jun 16, 2022
Free version of Okuru selfbot, okuru.xyz

Indigo Selfbot Free OpenSource selfbot, Premium version can be found at https://okuru.xyz (5$.) Usage python[3] main.py Installation To install you ca

Dimitri Demarkus 31 Aug 07, 2022
A short course on Julia and open-source software development

Advanced Scientific Computing: producing better code This course is taught as a 6-session "nanocourse" at Washington University in St. Louis. See the

Tim Holy 230 Jan 07, 2023
Automatização completa do site https://blaze.com

PyBlaze Pyblaze possibilita o acesso a api do site blaze utilizando python, retornando os últimos resultados de crashs e doubles. Agora também é possí

Cleiton Leonel 24 Dec 30, 2022
A sandpit for textual related things

A sandpit repo for testing textual related things.

Craig Gumbley 1 Nov 08, 2021
A modern python module including many useful features that make discord bot programming extremely easy.

discord-super-utils Documentation Secondary Documentation A modern python module including many useful features that make discord bot programming extr

106 Dec 19, 2022
Lightweight and Modern kernel for VK Bots

This is the kernel for creating VK Bots written in Python 3.9

Yrvijo 4 Nov 21, 2021
Got-book-6 - LSTM trained on the first five ASOIAF/GOT books

GOT Book 6 Generator Are you tired of waiting for the next GOT book to come out? I know that I am, which is why I decided to train a RNN on the first

Zack Thoutt 974 Oct 27, 2022
Async Python Circuit Breaker implementation

aiocircuitbreaker This is an async Python implementation of the circuitbreaker library. Installation The project is available on PyPI. Simply run: $ p

5 Sep 05, 2022