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
Home Assistant integration for spanish electrical data providers (e.g., datadis)

homeassistant-edata Esta integración para Home Assistant te permite seguir de un vistazo tus consumos y máximas potencias alcanzadas. Para ello, se ap

VMG 163 Jan 05, 2023
Fixed waypoint(pose) navigation for turtlebot simulation.

Turtlebot-NavigationStack-Fixed-Waypoints fixed waypoint(pose) navigation for turtlebot simulation. Task Details Task Permformed using Navigation Stac

Shanmukha Vishnu 1 Apr 08, 2022
This is a working model for which I have used python.

Jarvis_voiceAssistance This is a working model for which I have used python. This model can: 1)Play a video or song on youtube. 2)Tell us time. 3)Tell

Hardik Jain 1 Jan 30, 2022
Mata kuliah Bahasa Pemrograman

praktikum2 MENGHITUNG LUAS DAN KELILING LINGKARAN FLOWCHART : OUTPUT PROGRAM : PENJELASAN : Tetapkan nilai pada variabel sesuai inputan dari user :

2 Nov 09, 2021
Hspice-Wave-Generator is a tool used to quickly generate stimuli souces of hspice format

Hspice-Wave-Generator is a tool used to quickly generate stimuli souces of hspice format. All the stimuli sources are based on `pwl` function of HSPICE and the specific complex operations of writing

3 Aug 02, 2022
py2dis - A disassembly engine & library for Python

py2dis - A disassembly engine & library for Python. py2dis is a disassembly library for Python that does not use any modules/libraries other than colo

3 Feb 04, 2022
ARK sõidueksami Matrixi bot

ARK Sõidueksami bot Küsib ARK-i lehelt uusimad eksami ajad ja saadab sõnumi Matrixi kanali Dev setup Linux python3 -m venv venv source venv/bin/activa

Arti Zirk 3 Jun 15, 2021
BloodCheck enables Red and Blue Teams to manage multiple Neo4j databases and run Cypher queries against a BloodHound dataset.

BloodCheck BloodCheck enables Red and Blue Teams to manage multiple Neo4j databases and run Cypher queries against a BloodHound dataset. Installation

Mr B0b 16 Nov 05, 2021
Repository for my Monika Assistant project

Monika_Assistant Repository for my Monika Assistant project Major changes: Added face tracker Added manual daily log to see how long it takes me to fi

3 Jan 10, 2022
This is a modified variation of abhiTronix's vidgear. In this variation, it is possible to write the output file anywhere regardless the permissions.

Info In order to download this package: Windows 10: Press Windows+S, Type PowerShell (cmd in older versions) and hit enter, Type pip install vidgear_n

Ege Akman 3 Jan 30, 2022
Traductor de webs desde consola usando el servicio de Google Traductor.

proxiGG Traductor de webs desde consola usando el servicio de Google Traductor. Se adjunta el código fuente para Python3 y un binario compilado en C p

@as_informatico 2 Oct 20, 2021
Mpis-ex7 - Implementation of tasks 1, 2, 3 for Metody Probabilistyczne i Statystyka Lista 7

Implementations of task 1, 2 and 3 from here Author: Maciej Bazela Index: 261743 Each task was implemented in Python 3. I've used Cython to speed up e

Maciej Bazela 1 Feb 27, 2022
A script to generate NFT art living on the Solana blockchain.

NFT Generator This script generates NFT art based on its desired traits with their specific rarities. It has been used to generate the full collection

Rude Golems 24 Oct 08, 2022
A web interface for a soft serve Git server.

Soft Serve monitor Soft Sevre is a very nice git server. It offers a really nice TUI to browse the repositories on the server. Unfortunately, it does

Maxime Bouillot 5 Apr 26, 2022
Free APN For Python

Free APN For Python

XENZI GANZZ 4 Apr 22, 2022
The ROS publisher/subscriber example packaged as a snap

publisher-subscriber The ROS publisher/subscriber example packaged as a snap, based on ROS Noetic and Ubuntu Core 20. Strictly confined. This example

3 Dec 03, 2021
This is an independent project to track Nubank expenses

Nubank expense tracker This is an independent project to track Nubank expenses. To fetch Nubank data we are going to use an unofficial Nubank API, tha

Ramon Gazoni Lacerda 0 Aug 28, 2022
decorator

Decorators for Humans The goal of the decorator module is to make it easy to define signature-preserving function decorators and decorator factories.

Michele Simionato 734 Dec 30, 2022
JurjenLang, an interpreted programming language

JurjenLang An interpreted programming language Getting started Follow these three steps on your computer to get started git clone https://github.com/J

JVerbruggen 5 May 03, 2022
A collection of useful functions for writers to analyze text/stories.

AuthorTools AuthorTools provides a multitude of functions for easily analyzing (your?) writing. AuthorTools is made especially for creative writers wi

1 Jan 14, 2022