## Introduction

In this project we will build graphics programs that shows what an
object (rectangle - piece of paper) will look like when folded. The user defines
a "folding line" and the program show what the object (rectangle - piece of paper)
will look like when folded. (see the diagrams)

Use graphics.py.
Click HERE
for more information.
(download, install, documentation, etc.)

*Note: I am not a mathematician and I'm sure there are elegant solutions
to this problem. My solution is not one of them. It is more of a fumble/stumble solution.*

To see how my algorithm works,
click HERE
.

If you understand my algorithm, to see a description
of the folding direction problem
click HERE
.

For some useful math and code examples,
click HERE
.
If you just want code examples,
click HERE
.

## Project #1

Create an interactive program to demonstrate folding a rectangle (piece of paper?).

sizes:

- graphics window (height/width): 800px, 800px
- rectangle (height/width): 400px, 400px

rules:

- A line is a mathematical concept. It goes to infinity
in both directions. A line segment is a line
between two points.
- The fold line is a line segment.
- Fold line start/end points must be outside of the object (piece of paper?).
- Allow the user to define the fold line start/end points.
- The fold line must pass through two and only two object line segments.
- Do all of the calculations in FLOAT. Convert to integers when drawing.
- Allow the user to select which direction to rotate the object when
aligning the fold line with the Y axis (or X axes)

(clockwise or counterclockwise).
- Allow the user to select which direction to fold

(right-to-left or left-to-right or top-to-bottom or bottom-to-top).

*Note: Solve the problem shown in the diagrams above first. Then generalize
it to allow the user to select any fold line, any rotation direction
(clockwise/counterclockwise), and any fold direction.*

## Project #2

Create an interactive program to demonstrate folding other shaped objects
(polygons and curves).

## Project #3

Fold an object more then once.

## Links

distance between point and Line