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
The ROS package for Airbotics.

airbotics The ROS package for Airbotics: Developed for ROS 1 and Python 3.8. The package has not been officially released on ROS yet so manual install

Airbotics 19 Dec 25, 2022
This is a Python script to detect rapid upwards price changes (pumps) in a cryptocurrency pairing

A python script to detect a rapid upwards price brekout (pump) in a cryptocurrency pairing, through pandas and Binance API.

3 May 25, 2022
Small C-like language compiler for the Uxn assembly language

Pyuxncle is a single-pass compiler for a small subset of C (albeit without the std library). This compiler targets Uxntal, the assembly language of the Uxn virtual computer. The output Uxntal is not

CPunch 13 Jun 28, 2022
The Python agent for Apache SkyWalking

SkyWalking Python Agent SkyWalking-Python: The Python Agent for Apache SkyWalking, which provides the native tracing abilities for Python project. Sky

The Apache Software Foundation 149 Dec 12, 2022
A set of tools for ripping music from Konami mobile games

Konami Mobile Ripping Toolset A set of tools for ripping music from Konami mobile games Contents nigger.py for niggering konami's website, ripping all

5 Oct 20, 2022
Mmr image postbot - Бот для создания изображений с новыми релизами в сообщество ВК MMR Aggregator

Mmr image postbot - Бот для создания изображений с новыми релизами в сообщество ВК MMR Aggregator

Max 3 Jan 07, 2022
This is a batch script created to WEB-DL.

widevine-L3-WEB-DL-Script This is a batch script created to WEB-DL. Works well with .mpd files , for m3u8 please use n_m3u8 program (not included in t

Paranjay Singh 312 Dec 31, 2022
CD for MachineLearnia

Codebase supporting my talk on CI/CD for MachineLearnia (Nov 12 2021) The dataset used is available here. The point of the talk is to demonstrate a si

0 Feb 23, 2022
Given an array of integers, calculate the ratios of its elements that are positive, negative, and zero.

Given an array of integers, calculate the ratios of its elements that are positive, negative, and zero. Print the decimal value of each fraction on a new line with places after the decimal.

Shruti Dhave 2 Nov 29, 2021
kurwa deska ADB

kurwa-deska-ADB kurwa-deska Запуск Linux -- python3 kurwa_deska.py Termux -- python3 kurwa_deska.py Встановлення cd kurwa_deska ADB і зразу запуск pyt

1 Jan 21, 2022
Lightweight Scheduled Blocks Checker for Current Epoch. No cardano-node Required, data is taken from blockfrost.io

ReLeaderLogs For Cardano Stakepool Operators: Lightweight Scheduled Blocks Checker for Current Epoch. No cardano-node Required, data is taken from blo

SNAKE (Cardano Stakepool) 2 Oct 19, 2021
My solutions for Advent of Code 2021 🌟🎄

🌟 Advent of Code 2021 🎄 My solutions for Advent of Code 2021. About · What is Advent of Code? · Contents · Usage · Table of puzzles (TODO: add final

Amanda P. Pinha 2 Dec 05, 2022
Discord's own Dumbass made for shits n' Gigs!

FWB3 Discord's own Dumbass made for shits n' Gigs! Please note: This bot is made to be stupid and funny, If you want to get into bot development you'r

1 Dec 06, 2021
A tool to guide you for team selection based on mana and ruleset using your owned cards.

Splinterlands_Teams_Guide A tool to guide you for team selection based on mana and ruleset using your owned cards. Built With This project is built wi

Ruzaini Subri 3 Jul 30, 2022
Free Vocabulary Trainer - not only for German, but any language

Bilderraten DOWNLOAD THE EXE FILE HERE! What can you do with it? Vocabulary Trainer for any language Use your own vocabulary list No coding required!

Hans Alemão 4 Jan 02, 2023
This repo created to complete the task HACKTOBER 2021, contribute now and get your special T-Shirt & Sticker. TO SUPPORT OWNER PLEASE PRESS STAR BUTTON

❤ THIS REPO WILL CLOSED IN 31 OCT 00:00 ❤ This repository will automatically assign the hacktoberfest and hacktoberfest-accepted labels to all submitt

Rajendra Rakha 307 Dec 27, 2022
Educational Repo. Used whilst learning Flask.

flask_python Educational Repo. Used whilst learning Flask. The below instructions will be required whilst establishing as new project. Install Flask (

Jordan 2 Oct 15, 2021
SpellingBeeSolver - This program generates solutions to NYT style spelling bee problems.

SpellingBeeSolver This program generates solutions to NYT style spelling bee problems. The initial version of this program is being written in Python

1 Jan 01, 2022
Pre-crisis Risk Management for Personal Finance

Антикризисный риск-менеджмент личных финансов Риск-менеджмент личных финансов условиях санкций и/или финансового кризиса: делаем сегодня все, чтобы за

Dmitry Petukhov 593 Jan 09, 2023
Customisable coding font with alternates, ligatures and contextual positioning

Guide Ligature Support Links Log License Guide Live Preview + Download larsenwork.com/monoid Install Quit your editor/program. Unzip and open the fold

Andreas Larsen 7.6k Dec 30, 2022