Fold a Piece of Paper

Inverse Sine/Cosine

The trigonometric inverse sine is numpy.arcsin() method in Python Numpy. (See the numpy.arcsin documentation.)

The trigonometric inverse cosine is numpy.arccos() method in Python Numpy. (See the numpy.arccos documentation.)

(Also see numpy.rad2deg documentation.)
(Also see numpy.deg2rad documentation.)

What is Sine and Cosine

image missing

Law of Sines

image missing


 sin(α)     sin(β)     sin(δ)
-------- = -------- = --------
   A          B          C

Use the Law of Sines to solve oblique triangles. Any triangle that is not a right triangle is an oblique triangle.

Note: There are three possible oblique triangle problem situations: ASA (angle-side-angle), AAS (angle-angle-side), and SSA (side-side-angle).

Calculate the Slope of a Line

    rise   y2 - y1
m = ---- = -------
    run    x2 - x1

m       = slope
(x1,y1)	= coordinates of first point in the line
(x2,y2)	= coordinates of second point in the line

The slope of a line parallel to the Y axis is undefined (x2-x1 = 0).
The slope of a line parallel to the X axis is 0 because (y2-y1 = 0).

Code Examples

test_slope.py

test_arcsin.py
test_arcos.py
calculate the angle between two vectors (line segments)
rotate a line anchored at the origin (0,0)

line_intersection.py
test_line_intersection.py

parallel_lines.py
two_vector_angle.py
test_two_vector_angle.py

test_fold_01.py
test_fold_02.py

These are files you will need for the code examples. They can be found in other project descriptions. Especially the project "Demonstrate using a graphics transformation matrix (2D and/or 3D)".

graphics.py
coordinate_conversion.py
draw_xy_axes.py
transformation_matrix.py
user_interface.py