Skip to content

aryanrai2001/J2IGF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

J2IGF - Java 2D Interactive Graphics Framework

As the name suggests, it is an interactive graphics framework built from scratch in Java. The goal of this project is to create a framework that has a wide range of options available. It provides pixel-level control as well as abstract functionalities to generate complex graphics, and lastly, it is capable of interpreting user input.


This project is only meant for educational purposes, as it does not use hardware-accelerated rendering, and in the present day there is no practical application of software rendering. It may still be useful for creating quick visualisations as well as some low-fidelity interactive applications. Lastly, it can help develop an understanding of how graphics are rendered under the hood, as the fundamentals always remain the same.


J2IGF will allow you to explore the world of computer graphics! In this section, we will get to know the fundamentals of computer graphics within the context of Java 2D Interactive Graphics Framework. This framework is specifically designed to be verbose with its functionality and allow people to understand the working principles of similar graphics frameworks. This is purely for educational purposes and focuses on 2D graphics, providing a platform for learning and experimenting with various aspects of computer graphics.

What is Computer Graphics?

Computer graphics refers to the creation, manipulation, and representation of visual content using computers. It encompasses a wide range of applications, including video games, animations, simulations, user interfaces, and more. Computer graphics enables us to bring our ideas to life by generating and rendering digital images and visual effects.

Core concepts explored in this framework :-

There are several core concepts that are essential to understand the working of J2IGF. Let's explore some of these key topics:

Coordinate Systems

A coordinate system defines how we represent positions in a 2D space. In our framework, we typically use a Cartesian coordinate system, where points are located using X and Y coordinates. The origin (0, 0) is usually in the top-left corner of the screen or window, with positive X values extending towards the right and positive Y values extending downward.

Primitives

Primitives are fundamental geometric shapes used to construct more complex 2D objects. Our framework supports basic primitives such as points, lines, rectangles, circles, triangles, and text. By combining and manipulating these primitives, you can create more intricate and visually appealing graphics. Along with these primitives, J2IGF also supports sprites and animations, which can be used to create more complex graphics.

Transformations

Transformations allow you to modify the position, size, rotation, and scaling of objects within the 2D space. Common transformations include translation (shifting an object's position), rotation (rotating an object around a specified point), and scaling (changing an object's size). These transformations provide the foundation for animating and manipulating objects in your 2D graphics.

Color and Transparency

Color and transparency play a crucial role in enhancing the visual appeal of your 2D graphics. J2IGF provides the ability to set colors and adjust transparency levels, to fill and stroke shapes. By utilizing different colors and transparency settings, you can create visually stunning compositions with varying degree of fidelity.

Rendering and Interaction

Rendering involves the process of converting the internal representation of 2D objects into a visual output on the screen. In J2IGF, you have maximum controle over the process of rendering. Additionally, the framework provides interaction capabilities, allowing you to capture user input, such as mouse clicks and keyboard events, to create interactive experiences.


Have a look at the Demos to understand the working of J2IGF