41-MCODE Vector Calculator (3D) « Next Oldest | Next Newest »

 ▼ Ángel Martin Unregistered Posts: 1,253 Threads: 117 Joined: Nov 2005 11-16-2011, 08:15 AM I've taken the opportunity to add some extensions to the ROMS containing some of the HP_Solution_Books. In particular the Geometry ROM had more than 2/3rds. of empty space, a waste that needed correction - So I added a few triangle solvers and a coordinate tranformations FOCAL programs. As there was still more available room, I went ahead and wrote a handy set of MCODE functions to handle 3D-Vector operations - you know, the usual suspects. They use the stack for the first operand and Alpha for the second, leaving the results in the stack - so nothing fancy like a Vector-stack or similar, just plain and simple. A couple of interesting remakrs : - V<>, VVIEW, VRCL and VSTO are programmable prompting functions that work on three-register blocks at once - VVIEW and VIEWV sequentially display the three vector components using the display (not Alpha obviously) - using the new functions the "VC" program from the HP-41 Advantage module shrinks down to barely 45 lines ;-) The functions are listed below:- you can download it from TOS, just use the usual procedure. ```-VECTORS Header Section A+V Vector Addition A-V Vector Subtraction A*V Vector Dot Product AXV Vector Cross Product V<> _ _ Vector Exchange V<>A Vector Swap VADST Distance between Vectors VANG Angle Between Vectors VCHS Vector negative VENTER^ Vector ENTER^ VIEWV Vector View VINV Vector Inverse VMOD Vector Magnitude VNORM Vector Norm VRCL _ _ RCL Vector VSTO _ _ STO Vector VUNIT Unit Vector VVIEW _ _ View Vector ``` Best, ÁM

 Possibly Related Threads… Thread Author Replies Views Last Post HP Prime: adding an entry to a vector Alberto Candel 12 4,046 12-02-2013, 01:18 PM Last Post: Alberto Candel HP Prime - vector question bluesun08 3 1,791 11-18-2013, 07:26 PM Last Post: Han 3D graphing planned for HP Prime Mic 5 2,051 11-11-2013, 10:17 AM Last Post: Tim Wessman HP-41 MCODE: The Last Function - at last! Ángel Martin 0 1,047 11-08-2013, 05:11 AM Last Post: Ángel Martin [HP-Prime CAS] Vector Calculus Library CompSystems 7 2,752 10-31-2013, 12:48 PM Last Post: Han HP-Prime/Xcas: vector/list indexing fhub 6 2,854 10-27-2013, 04:52 PM Last Post: fhub 3D Grapher and Insufficient Memory Han 10 2,894 09-27-2013, 06:39 AM Last Post: Pier Aiello HP Prime: Vector field CURL(). How-to... Chris Tvergard 4 1,651 09-26-2013, 03:55 PM Last Post: Chris Tvergard 3D graphing on HP Prime Glenn Becker 2 1,323 09-11-2013, 06:08 AM Last Post: Don Shepherd WP-34S: Program for vector (3D) manipulation Marcel Samek 4 1,836 09-05-2013, 05:29 AM Last Post: Marcus von Cube, Germany

Forum Jump: