BenSouchet / polygons

Personal Project - Graphic - Polygons Explorer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 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

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 :

./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

About

Personal Project - Graphic - Polygons Explorer

License:Other


Languages

Language:C 91.1%Language:Objective-C 6.9%Language:Makefile 1.4%Language:C++ 0.6%