Five custom scripts you may find useful 1. find the direction from one point to another point 2. 3D projection 3. rotate one point around another point 4. rotate a direction toward another direction by an amount of degrees 5. check if a cell in a grid is on the edge of the grid based on its id and the width/height of the grid.
Click "see inside" I don't remember which of these I made myself and which are modified or exact versions of scripts from other people. any variable starting with # is used for calculations within the scripts and variables starting with @ are used to store the outputs of scripts.