Skip to content

A tool for defining and manipulating polygons under a set of given constraints.

License

Notifications You must be signed in to change notification settings

AleksyBalazinski/Polygons

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Polygons

A tool for defining and manipulating polygons under the set of given constraints of two kinds:

  • any number of edges can be specified as being parallel to each other; such edges will remain parallel no matter what transformations are taking place.
  • any number of edges can be specified to have fixed lengths; the lengths of such edges won't change under any transformation.

Program architecture

The program can be in many different states (drawing, defining costraints, etc.) and in each one of them user input is interpreted differently. The state design pattern proved to be a quite elegant solution to this problem. In order to make the program easily extensible with regard to adding new drawing line and circle algorithms, the visitor design pattern has been emplyed; concrete drawing methods are substituted at run-time (cf. the use of function objects in the Algorithm class).

Constraints algorithm

The detailed description of the algorithm can be found (in Polish) in README.pl.md. The English translation is coming soon.

Demo

Parallel edges are marked with orange numbers. Edges whose length is in gray have fixed length. demo

About

A tool for defining and manipulating polygons under a set of given constraints.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages