The following warnings occurred:
Warning [2] Undefined array key 205013 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $thread - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $fid - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 205013 - Line: 331 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 331 errorHandler->error_callback
/inc/plugins/threaded_mode.php 304 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $theme - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $theme - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $lang - Line: 5 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 5 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Attempt to read property "messages_in_thread" on null - Line: 5 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 5 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks





41-MCODE Vector Calculator (3D)



#2

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 3,910 12-02-2013, 01:18 PM
Last Post: Alberto Candel
  HP Prime - vector question bluesun08 3 1,745 11-18-2013, 07:26 PM
Last Post: Han
  3D graphing planned for HP Prime Mic 5 2,002 11-11-2013, 10:17 AM
Last Post: Tim Wessman
  HP-41 MCODE: The Last Function - at last! Ángel Martin 0 1,020 11-08-2013, 05:11 AM
Last Post: Ángel Martin
  [HP-Prime CAS] Vector Calculus Library CompSystems 7 2,679 10-31-2013, 12:48 PM
Last Post: Han
  HP-Prime/Xcas: vector/list indexing fhub 6 2,774 10-27-2013, 04:52 PM
Last Post: fhub
  3D Grapher and Insufficient Memory Han 10 2,833 09-27-2013, 06:39 AM
Last Post: Pier Aiello
  HP Prime: Vector field CURL(). How-to... Chris Tvergard 4 1,611 09-26-2013, 03:55 PM
Last Post: Chris Tvergard
  3D graphing on HP Prime Glenn Becker 2 1,288 09-11-2013, 06:08 AM
Last Post: Don Shepherd
  WP-34S: Program for vector (3D) manipulation Marcel Samek 4 1,774 09-05-2013, 05:29 AM
Last Post: Marcus von Cube, Germany

Forum Jump: