Fold a Piece of Paper

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)

image missing image missing

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:

rules:

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

image missing

Project #3

Fold an object more then once.

Links

distance between point and Line