An open API service indexing awesome lists of open source software.

https://github.com/bensouchet/polygons

Personal Project - Graphic - Polygons Explorer
https://github.com/bensouchet/polygons

generator gui polygons

Last synced: 3 months ago
JSON representation

Personal Project - Graphic - Polygons Explorer

Awesome Lists containing this project

README

          

# Polygons

Polygons is a tiny C program developed in my free time at 42 school for generating all polygons from 1 to 360 sides.

Several options are available (see [Keyboard shortcuts](https://github.com/BenjaminSouchet/Polygons/blob/master/README.md#keyboard-shortcuts) section for more infos) :
* Zoom and unzoom
* Rotate the polygon
* Edit the shape of the polygon
* Edit the position of all odd and/or even vertex
* Choose from edge or fill for the display of the poly
* Navigate between polygons with 1 to 360 sides

## Install & launch
```bash
git clone https://github.com/BenjaminSouchet/Polygons.git ~/Polygons
cd ~/Polygons && ./polygons 5
```
You can also launch the program with a parameter. It's the number of sides you want for the polygon at the execution of the program. This parameter as to be between 1 and 360 included.

Exemple :
```bash
./polygons 10
```

## Keyboard shortcuts

Description

 Key(s) 

Close the program (aka quit/exit)
 esc 

Reset all the changes made since the beginning
 clear 

Increase the global size of the polygon (aka zoom)
 + 

Decrease the global size of the polygon (aka unzoom)
 - 

Increase the height of the polygon (aka height stretch)
 ▲ 

Decrease the height of the polygon (aka height shrink)
 ▼ 

Increase the width of the polygon (aka width stretch)
 ► 

Decrease the width of the polygon (aka width shrink)
 ◄ 

Fill or unfill the polygon
 shift 

Increase the position of all odd points of the polygon
 W 

Decrease the position of all odd points of the polygon
 Q 

Increase the position of all even points of the polygon
 S 

Decrease the position of all even points of the polygon
 A 

Clockwise rotation of the polygon
 X 

Counter clockwise rotation of the polygon
 Z 

Previous polygon
 page 
up

Next polygon
 page 
down

## Contact & contribute
If you want to contact me, or fix/improve Polygons, just send me a mail at **bsouchet@student.42.fr**