The spreadsheet IP2_py provides a large number of geometric functions, including intersection points of lines, circles and planes, interpolation, rotations, and converting between coordinate systems. Many of the functions are available in VBA and Python versions. The Python code has now been updated to work with Python 3. The updated files can be downloaded from:
Examples of the included functions are shown in the following screenshots:
IP() and IP_4 find the intersection points of 2 lines or polylines:
The Circle Functions sheet contains functions to find the intersection points or lines, circles and spheres, and the 3D centre of circles or arcs:
The PDist function returns the perpendicular distance from point to a polyline:
MaxDist returns the maximum distance between any two points in a list:
RtoP and PtoR convert coordinates between rectangular and polar systems. Rotate returns coordinates of one or more points, rotated about a specified axis:
IP_3D finds the intersection point of two 3D lines:
The 3DPlaneIP sheet contains functions to find the intersection of planes and related functions:
The PView function returns a perspective projection of coordinates viewed from a specified angle and distance.
The Interp functions provide linear, logarithmic and quadratic interpolation in 1 or 2 dimensions:
The Glob_to_Loc and Loc_to_Glob transform vectors between different coordinate systems:
Glob_to_Loc3 rotates plate or 3 node beam deflections or forces between global and local axis systems:
Fit_Circ3D returns a least-squares fit of a 3D circle or arc to a set of points:
The Python based functions require Python, Numpy and xlwings. These are installed by default in the Anaconda Python installation.