Tuesday, September 11, 2007

Euclid Pack - The Geometric Calculator

The idea of this programming project come from my day time job that also include computer graphics (3D visualization and CAD type of problems).

An important module in our software is an API we call Euclid. It do 2D and 3D geometric calculations and is well tested. I think it might be of use to have a version of it on a calculator when testing and debug code that is using the Euclid API. I name the calculator version Euclid Pack.

Initial specification for the problems to solved by the Euclid Pack:
1. Compute the implicit equation for a 2D line given two 2D points. HP-35s
2. Find the signed distance from a 2D line to a 2D point. HP-35s
3. Evaluate points on a lines (2D or 3D) using their parametric equations. HP-35s
4. "Normalize" the segment defining a line (2D or 3D). HP-35s
5. Find the distance from a 3D line to a 3D point. HP-35s
6. Compute the closest point on a line to a point (2D or 3D). HP-35s
7. Find the point of intersection of two 2D lines or learn that the lines are paralell. HP-35s
8. Find the unique shortest line between two 3D lines or learn that the lines intersect or are paralell. HP-35s
9. Compute the implicit equation for a plane given A) a point and normal vector or B) three points. HP-35s (A, B)
10. Find the signed distance from a plane to a point. HP-35s
11. Compute the closest point on a plane to a point. HP-35s
12. Find the point of intersection of a plane and a line or learn that the plane and line are paralell. HP-35s
13. Find the line of intersection between two planes. HP-35s
14. Cartesian coordinates to Barycentric coordinates. HP-35s
15. Barycentric coordinates to Cartesian coordinates. HP-35s
16. Compute a triangle's inscribed circle. HP-35s
17. Compute a triangle's circumscribed circle. HP-35s
The plan is to implement this on the HP-35s once it is available to me. If I managed to get my old HP-41CV repaired I might try to implement it on that as well.

On paper the HP-35s should be a good machine for this since it has 2D and 3D vectors.