top of page
Tri.JPG

Summary of Problems

1. A line segment and a triangle have two intersection points on the sides of the triangle.

2. Two triangles have two intersection on the same side with only one vertex of a triangle inside.

3. Two triangles have three intersection points with one intersection on one side and two on the other side. No side of one triangle is completely inside another triangle.

Algorithm

  • For each single triangle, based on law of cosines/sines, sum of angles, and law of tangents, all the side lengths and angles can be solved if either one of the following conditions is given (S: side length/ A: angle):  SSS/SAS/SSA/ASA/AAS.

 

  • For problem 1, 2 and 3, a new triangle is generated when the line or the triangles have intersections. The new triangle will have side lengths: x, y, z and angles: θ1­, θ2 and a shared angle with one of the original triangles.​

 

  • With all the sides and angles of all the triangles solved with single triangle solver function, the length of other sides can simply be solved by sum of angles and subtraction of known side lengths.

Progress1.JPG

Update 10/30

 

Progress:

Single Triangle Solver that supports SSS AAS ASA SAS has been finished.

Solver(a,b,c,A,B,C) can calculate the sides and angles of a triangle.

Challenges:

Webpage python code right now.

Update 11/14

 

Debugged:
Single Triangle solver can be implemented to the webpage now.

Working on:
Solver1.py - first type of problem (Triangle and line with 2 interscetions) 
    - It should be able to compute all values if enough info for the two triangles are provided.
    - Still need to consider special cases

 

Update 11/18

Completed:
       Solvers for 3 problems are finished.
       Basic Web Interface is done.

Debugging:
       Can't figure out how to display local picture files in Python CGI.

Working on:
       Improve Algorithm for solvers
           -detect wrong inputs
           -check if special conditions
       Improve Web User Interface

Update 11/23

Completed:

       Vertexes location input completed.
       Area calculation completed.
       New input and output implemented to the web interface.

Debugged:
       Display local picture files in Python CGI.

Working on:
       Improve Algorithm for solvers.
       Improve Web User Interface.

bottom of page