Welcome to the Table Lamp project, developed at Palestine Polytechnic University. This project provides a versatile rendering widget implemented in C++ using the Qt framework and is built using CMake. The widget is designed to facilitate the drawing of various geometric shapes, including lines, circles, ellipses, and arcs. Using these basic shapes I used them to draw a simple Lamp.
Whether you're a student exploring computer graphics or a developer seeking a lightweight graphics rendering tool, RenderWidget aims to meet your needs and goals. 🎯🔥
-
Drawing Lines 📈
The Render Widget supports two efficient functions for drawing lines - the Bresenham algorithm (draw Line) implementing in two ways , providing flexibility in line rendering. -
Drawing Circles ⚪️
Efficiently draw circles using the incremental method. -
Drawing Arcs 🌈
Specify the center, start angle, end angle, and radius to draw precise arcs using the drawArc method. -
Drawing Ellipses 🥚
Create ellipses by specifying the center and major and minor axes with the drawEllipse method. -
Clipping Lines 📏
Added functionality for clipping lines using the Cohen-Sutherland algorithm -
Filling Convex Polygons 🎨🖌
Filling convex and H-convex polygons using scanline filling technique.
The following picture show the table lamp that we draw using the simple functionality provided above.
The following picture show the car that we draw using the simple functionality provided above.
Dimensions of the level in which the drawing is made are like this:
But if you want to use this dimension ⬇️ you can call the functinn mapPoint(x,y) to map it to the original dimension