HP Forums
Modifying the triangle solver - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Modifying the triangle solver (/thread-22338.html)



Modifying the triangle solver - Abhlnav - 09-14-2024 10:40 PM

So, I got a prime about a month ago and for my use case, I really need to program a lot of things. For the first thing I'm working on, I would like to add functionality to the Triangle Solver application that's built in.

Here are some things I would like to add:
Inradius, Circumradius, Type/Shape (Obtuse, Acute, Right & Scalene, Isosceles, or Equilateral), a clear button to clear all input boxes, and finally a checkbox for something called "GM" where I would also display the lengths of all three angle bisectors, altitudes, and medians if selected.

Any idea on how I would go about implementing all of this? I made a custom one of these on the TI-89 Titanium but I'm switching over and really need this.


RE: Modifying the triangle solver - Tyann - 09-15-2024 05:59 AM

Bonjour
Pour chaque application, vous avez un programme correspondant qui est le premier de la liste des programme dans l'éditeur de programme ('SHIFT' '1').
Au départ celui-ci est vide, vous pouvez ici ajouter des fonctionnalités sous forme de programmes ou de fonctions (EXPORT).
Vous pouvez aussi redéfinir le rôle des touches 'Symb', 'Plot' et 'Num' et mettre en place un menu accessible avec la touche 'View'.
Consultez le guide officiel au chapitre 'Programmation en PPL' et 'Programmes d'application' vous trouverez tout le nécessaire et vous verrez que les possibilités sont très étendues.

Hello
For each application, you have a corresponding program which is the first in the list of programs in the program editor (‘SHIFT’ ‘1’).
This is initially empty, but here you can add functions in the form of programs or functions (EXPORT).
You can also redefine the role of the ‘Symb’, ‘Plot’ and ‘Num’ keys and set up a menu accessible with the ‘View’ key.
Consult the official guide in the ‘Programming in PPL’ and ‘Application programs’ chapters for everything you need to know, and you'll see that the possibilities are very extensive.

Translated with DeepL.com (free version)


RE: Modifying the triangle solver - C.Ret - 09-15-2024 07:32 AM

Bonjour et Bienvenue

Exactly as Tyann rightly indicates, it is possible to fully program your HP Prime and the programming language has all the appropriate commands to customize your machine at will. It is thus possible to create your own applications that will then perfectly meet each specific need.

This means that it is easier to create your own programs than to try to modify one of the default applications. On the other hand, all the results, calculations or procedures of these applications are accessible directly and indirectly from the user's programs.

But before writing your own programs, you must first master your HP Prime and all the possibilities it offers. Writing your own programs will be simplified.
Sometimes, we discover among the Applications treasures of ingenuity that will perfectly meet the most general or most specific needs. And there is no longer any need to program anything. Or to make very simple programs to format the results and adapt to our habits or preferences.

Graphically, the 'Triangle Solver' Application is very limited; there are only two bitmaps, one for any triangles and the other for right triangles.

[Image: attachment.php?aid=13951]

Using the 'Geometry' Application allows you to quickly solve a larger number of problems and obtain more solutions. The screenshot above only shows a quick overview of the infinite possibilities.

This 'Geometry' application seems to me to be more suited to the needs of Abhlnav. It took me only a few minutes in the 'Geometry' App to create the capture on the right (without any programming). I was pleasantly surprised that the measurements and indications that Abhlnav lists are already present among the many functions of this app.

Obviously, it is possible to write user programs that will exploit these possibilities and adapt the results to the data of specific cases. This can be very useful in the case of repeated tasks or if you want to setup your data at each use. A collection of small, short and specific programs can be easier to use and also to develop.

As Tyann rightly points out, the HP Prime programming tools allow you to use and adapt the interface for your own needs. In particular by assigning new functions to the black keys of the HP Prime. Thus, the collection of small programs can be easily accessed through the existing menus, but also by reassigning the MENU, VIEW, etc. keys.

Do not forget to 'COPY' the application for each new problem, the data, the programs and any occasional modifications will thus be saved in this new instance of the Application independently of other cases or other uses.

My last piece of advice to Abhlnav would be to first familiarize with the use of Applications (and here especially the 'Geometry' Application) in order to understand the ins and outs before diving headlong into programming. The development task will only be easier and the programs will have a better chance of effectively meeting the many needs.