Post Reply 
GRAPH 3D v2.425 (20-FEB-2017)
01-06-2014, 04:48 PM (This post was last modified: 02-15-2014 06:55 PM by Han.)
Post: #21
RE: GRAPH 3D v2.2 (beta, now with trace)
Here's a (beta) version with some bugs fixed and features added.

[Image: attachment.php?aid=144]

BUGS FIXED:
  1. Fixed issues with projection to prevent inversion
  2. Error messages about domain no longer leave V0 altered
  3. (9-JAN-2014 version) Rotation in degrees seemed to not work or worked improperly
  4. (9-JAN-2014 version) Changing number formats could result in non-working plots
  5. (9-JAN-2014 version) Complex mode resulted in non-working plots in the case of singularities or regions outside of the domain of a function


FEATURES ADDED:
  1. Translucency
  2. Color mode selection (based on xy values vs z values)
  3. Trace mode
  4. Boxed axes (-x refers to the xmin3D variable, +x refers to the xmax3D variable, etc)
  5. Bottom of viewing box shaded to distinguish zmin3D from zmax3D
  6. Graphical touch-based menu for color / trace / axes options
  7. Improved domain handling. Still missing code to determine limit behavior near certain singularites.


This version is a bit slower in the rotation due to not using the TRIANGLE command. Eventually, all versions will be combined into one with options to select which type of projection model (z-clipping vs translucent shading; perspective vs square projection, etc)

Download:
.zip  graph3d_v22polytrace.zip (Size: 23.12 KB / Downloads: 912) file recently updated (9-JAN-2014) to fix bugs with FIX number format, complex roots settings, and rotation issues in degree mode

For speedup tips, see: this post.

INSTALLATION AND WARNING: When installing, DO NOT use Notepad as it is unable to handle the long lines of data used by the ICON commands (at the very bottom of the source). Instead, use Wordpad or a more capable unicode text editor. If you are installing this onto the emulator, a simple copy/paste from Wordpad into the emulator is sufficient (if you are replacing an older version). You can optionally install this as a different app by selecting Advanced Graphing in the apps menu, and saving as "Surface" or some other name. Then, overwrite the Surface (App) source code (found in the program editor) with the source for this app.

To install onto the calculator, I recommend placing it into the emulator first. Then, on the emulator, select Calculator, Send To, HP Prime. Highlight the app and send to the calculator. Open the program editor, and open and close the program file for the app (this is to work around issues with the emulator sending things to the calculator).

Update: If you use commas (the "," symbol) for your fraction separator, change it to the period (the "." symbol), and then open and close the source file in the program editor to recompile it.


Attached File(s) Thumbnail(s)
   

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
01-06-2014, 10:23 PM
Post: #22
RE: GRAPH 3D v2.2 (beta, now with trace)
(01-06-2014 04:48 PM)Han Wrote:  Installing onto the calculator fails using conventional means (conn. kit. or emulator transferring to calculator). You must delete the icon commands, and then send the code without the icon commands. Then, send the icon commands as a separate program file. Lastly, recombine the source on the calculator itself using copy/paste. You may optionally used one of the alternative software packages to do your file transfers.

I'll update this post on how to install due to possible issues with text editors.

Hi Han,

The App actually works very well on the calculator and the Icons for changing transparency and trace etc. are very cool.

I managed to transfer the program to the calculator via the ConnKit. However, I did that by opening the app program from the calculator in the ConnKit and then saved all out. Waiting a few minutes and it was transferred. It shows up as about 110KB just after having run a graph, and around 87/88KB when recompiled.

Thank you very much for sharing

Cheers, Terje
Find all posts by this user
Quote this message in a reply
01-06-2014, 10:54 PM (This post was last modified: 01-06-2014 10:58 PM by eried.)
Post: #23
RE: GRAPH 3D v2.2 (beta, now with trace)
Wow, impressive work Han! Feels like the other bundled apps

But, in my opinion:
-Help/Symb buttons for rotation feel unnatural.
-The popup menu is cheesy Tongue I would prefer a normal menu in the bottom with 'trace* color* box'
-I would love pinch to zoom, double tap to trace and drag to rotate Big Grin

My website: ried.cl
Visit this user's website Find all posts by this user
Quote this message in a reply
01-07-2014, 12:38 AM
Post: #24
RE: GRAPH 3D v2.2 (beta, now with trace)
(01-06-2014 10:54 PM)eried Wrote:  Wow, impressive work Han! Feels like the other bundled apps

But, in my opinion:
-Help/Symb buttons for rotation feel unnatural.
-The popup menu is cheesy Tongue I would prefer a normal menu in the bottom with 'trace* color* box'
-I would love pinch to zoom, double tap to trace and drag to rotate Big Grin

Help/Symb -- agreed, but there are really only four directional keys. Do you have any suggestions for their replacements?

Popup Menu -- the menu at the bottom is just too small for my liking. Having become accustomed to much more reasonable sized icons on my smartphone, the small menu icons really only work if there were physicals keys that correspond to the menu. For touchscreen only menus, they need to be big and visible and easy to press. As for the effect -- it's just a few lines of code that adds a bit of character to the program, and is a natural way to bring up the menu or hide it. On the actual calculator, I removed the wait lines and it actually works very well. But to each his own :-)

Pinching/double tap/drag will be implemented if the next firmware improves the drawing algorithm. Right now, the speed is severely limited because I have to do all the projection calculations whereas TRIANGLE did all of that for me. So dragging, for example, would work in the 2.2 beta, but not in the 2.2 polytrace version because there would be too large a delay and the app would feel very unresponsive.

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
01-07-2014, 12:39 AM
Post: #25
RE: GRAPH 3D v2.2 (beta, now with trace)
(01-06-2014 10:23 PM)Terje Vallestad Wrote:  
(01-06-2014 04:48 PM)Han Wrote:  Installing onto the calculator fails using conventional means (conn. kit. or emulator transferring to calculator). You must delete the icon commands, and then send the code without the icon commands. Then, send the icon commands as a separate program file. Lastly, recombine the source on the calculator itself using copy/paste. You may optionally used one of the alternative software packages to do your file transfers.

I'll update this post on how to install due to possible issues with text editors.

Hi Han,

The App actually works very well on the calculator and the Icons for changing transparency and trace etc. are very cool.

I managed to transfer the program to the calculator via the ConnKit. However, I did that by opening the app program from the calculator in the ConnKit and then saved all out. Waiting a few minutes and it was transferred. It shows up as about 110KB just after having run a graph, and around 87/88KB when recompiled.

Thank you very much for sharing

Cheers, Terje

Thanks for sharing this technique.

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
01-07-2014, 05:43 AM
Post: #26
RE: GRAPH 3D v2.2 (beta, now with trace)
As for the rotation I would just use the numeric pad, 5 for centering, arrows as 2,4,6,8 and the other ones for rotation. I don't quite remember what was the key used on the 50g.

Well, in your phone, probably a link text is smaller than the size of the menu Big Grin but of course is just a personal preference.

My website: ried.cl
Visit this user's website Find all posts by this user
Quote this message in a reply
01-08-2014, 01:43 AM
Post: #27
RE: GRAPH 3D v2.2 (beta, now with trace)
Great work Han. I was able to successfully install and run the latest version of your 3d app on my HP Prime using the connectivity kit. However, the app doesn't want to
plot functions with singularities. For example, when I enter the function SQRT(x*y),
and press the plot key, nothing happens. Is there something I an doing wrong?
I haven't tried this on the emulator yet.
Find all posts by this user
Quote this message in a reply
01-08-2014, 02:03 AM (This post was last modified: 01-08-2014 02:35 AM by Han.)
Post: #28
RE: GRAPH 3D v2.2 (beta, now with trace)
(01-08-2014 01:43 AM)John Colvin Wrote:  Great work Han. I was able to successfully install and run the latest version of your 3d app on my HP Prime using the connectivity kit. However, the app doesn't want to
plot functions with singularities. For example, when I enter the function SQRT(x*y),
and press the plot key, nothing happens. Is there something I an doing wrong?
I haven't tried this on the emulator yet.

Which version did you install? The polytrace version should handle singularities just fine. The two versions on the original first post do not handle singularities beyond stopping when they encounter them. If you are getting a blank plot, try entering and exiting the source code and make sure no errors are produced. Then try graphing again.



EDIT: Also make sure your variables are all upper case if you don't already. As for SQRT(X*Y) -- SQRT() is a CAS function and does not always return a numerical value. You want the square root symbol [Shift][x^2].

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
01-08-2014, 03:07 PM
Post: #29
RE: GRAPH 3D v2.2 (beta, now with trace)
(01-06-2014 10:23 PM)Terje Vallestad Wrote:  
(01-06-2014 04:48 PM)Han Wrote:  Installing onto the calculator fails using conventional means (conn. kit. or emulator transferring to calculator). You must delete the icon commands, and then send the code without the icon commands. Then, send the icon commands as a separate program file. Lastly, recombine the source on the calculator itself using copy/paste. You may optionally used one of the alternative software packages to do your file transfers.

I'll update this post on how to install due to possible issues with text editors.

Hi Han,

The App actually works very well on the calculator and the Icons for changing transparency and trace etc. are very cool.

I managed to transfer the program to the calculator via the ConnKit. However, I did that by opening the app program from the calculator in the ConnKit and then saved all out. Waiting a few minutes and it was transferred. It shows up as about 110KB just after having run a graph, and around 87/88KB when recompiled.

Thank you very much for sharing

Cheers, Terje

Hello Terje,

Could you please explain more in details the steps for the procedure to transfer the program using the ConnKit.

Thank you and regards,

Miguel
Find all posts by this user
Quote this message in a reply
01-08-2014, 04:00 PM (This post was last modified: 01-08-2014 04:00 PM by eried.)
Post: #30
RE: GRAPH 3D v2.2 (beta, now with trace)
(01-08-2014 03:07 PM)Miguel Toro Wrote:  Hello Terje,

Could you please explain more in details the steps for the procedure to transfer the program using the ConnKit.

Thank you and regards,

Miguel

It's a "cloned" app from advanced graph. You can duplicate it in the emulator, paste the code and "send" the app to your physical calc: http://screencast.com/t/4JqC39cvq

(or in the conn kit, duplicating the same app and pasting the code but in the emulator you can test it directly)

My website: ried.cl
Visit this user's website Find all posts by this user
Quote this message in a reply
01-08-2014, 10:58 PM
Post: #31
RE: GRAPH 3D v2.2 (beta, now with trace)
(01-08-2014 02:03 AM)Han Wrote:  
(01-08-2014 01:43 AM)John Colvin Wrote:  Great work Han. I was able to successfully install and run the latest version of your 3d app on my HP Prime using the connectivity kit. However, the app doesn't want to
plot functions with singularities. For example, when I enter the function SQRT(x*y),
and press the plot key, nothing happens. Is there something I an doing wrong?
I haven't tried this on the emulator yet.

Which version did you install? The polytrace version should handle singularities just fine. The two versions on the original first post do not handle singularities beyond stopping when they encounter them. If you are getting a blank plot, try entering and exiting the source code and make sure no errors are produced. Then try graphing again.

Han
I installed Graph 3D v2.2polytrace (1-JAN-2014) and I used upper case X and Y
from the soft menu keys to enter the expression shift<x^2>X*Y. I press the
plot key and nothing happens-I just remain in the symbolic view. All other expressions
without singularities work fine. I will try this on the emulator and see if the problem
exists there.



EDIT: Also make sure your variables are all upper case if you don't already. As for SQRT(X*Y) -- SQRT() is a CAS function and does not always return a numerical value. You want the square root symbol [Shift][x^2].
Find all posts by this user
Quote this message in a reply
01-09-2014, 12:29 AM (This post was last modified: 01-09-2014 01:39 AM by Han.)
Post: #32
RE: GRAPH 3D v2.2 (beta, now with trace)
Actually, the more I think about it the more I am beginning to suspect that I need to check whether sqrt() returns a complex value.

Edit: The above is precisely the issue. If you uncheck "Allow complex output from real input" then it should work. This issue will be addressed in a future update.

Edit #2: The source is updated to fix two issues recently brought to light: FIX number format, and complex mode. If you redownload the program, it should take care of the issues.

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
01-09-2014, 05:10 AM
Post: #33
RE: GRAPH 3D v2.2 (beta, now with trace)
(01-09-2014 12:29 AM)Han Wrote:  Actually, the more I think about it the more I am beginning to suspect that I need to check whether sqrt() returns a complex value.

Edit: The above is precisely the issue. If you uncheck "Allow complex output from real input" then it should work. This issue will be addressed in a future update.

Edit #2: The source is updated to fix two issues recently brought to light: FIX number format, and complex mode. If you redownload the program, it should take care of the issues.

That was the problem Han, thanks. I will download the revised version.
Find all posts by this user
Quote this message in a reply
01-09-2014, 05:41 AM (This post was last modified: 01-09-2014 05:54 AM by John Colvin.)
Post: #34
RE: GRAPH 3D v2.2 (beta, now with trace)
(01-09-2014 12:29 AM)Han Wrote:  Actually, the more I think about it the more I am beginning to suspect that I need to check whether sqrt() returns a complex value.

Edit: The above is precisely the issue. If you uncheck "Allow complex output from real input" then it should work. This issue will be addressed in a future update.

Edit #2: The source is updated to fix two issues recently brought to light: FIX number format, and complex mode. If you redownload the program, it should take care of the issues.

Han, I downloaded and installed the latest version Graph 3D v2.2polytrace (8-JAN-2014)
, but the graph of sqrt(XY) still does not display when complex is checked.
Find all posts by this user
Quote this message in a reply
01-09-2014, 02:45 PM (This post was last modified: 01-09-2014 02:47 PM by Han.)
Post: #35
RE: GRAPH 3D v2.2 (beta, now with trace)
(01-09-2014 05:41 AM)John Colvin Wrote:  Han, I downloaded and installed the latest version Graph 3D v2.2polytrace (8-JAN-2014)
, but the graph of sqrt(XY) still does not display when complex is checked.

Would you humor me and double check that the source code file on the calculator itself shows 8-JAN-2014? (I have had instances where uploading an update only restored an old, deleted version on the calc. If this is the case for you, delete the old app, and select something like the Sequence app and save it as Graph3D. After that, the transfer should load the new version and not restore the old one as it has to completely change the type of app). And lastly, could you list your Home and CAS settings (even though I don't think the latter actually affects anything, may as well be safe) for which the plotting does not work?

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
01-09-2014, 11:16 PM
Post: #36
RE: GRAPH 3D v2.2 (beta, now with trace)
(01-09-2014 02:45 PM)Han Wrote:  
(01-09-2014 05:41 AM)John Colvin Wrote:  Han, I downloaded and installed the latest version Graph 3D v2.2polytrace (8-JAN-2014)
, but the graph of sqrt(XY) still does not display when complex is checked.

Would you humor me and double check that the source code file on the calculator itself shows 8-JAN-2014? (I have had instances where uploading an update only restored an old, deleted version on the calc. If this is the case for you, delete the old app, and select something like the Sequence app and save it as Graph3D. After that, the transfer should load the new version and not restore the old one as it has to completely change the type of app). And lastly, could you list your Home and CAS settings (even though I don't think the latter actually affects anything, may as well be safe) for which the plotting does not work?

Han, I checked the date on the calculator itself and you are right. An older version
of Graph3D (1-Jan - 2014) was there. I will follow your instructions and let you
know if that fixed the problem. Thanks for your help.
Find all posts by this user
Quote this message in a reply
01-09-2014, 11:36 PM
Post: #37
RE: GRAPH 3D v2.2 (beta, now with trace)
(01-09-2014 11:16 PM)John Colvin Wrote:  
(01-09-2014 02:45 PM)Han Wrote:  Would you humor me and double check that the source code file on the calculator itself shows 8-JAN-2014? (I have had instances where uploading an update only restored an old, deleted version on the calc. If this is the case for you, delete the old app, and select something like the Sequence app and save it as Graph3D. After that, the transfer should load the new version and not restore the old one as it has to completely change the type of app). And lastly, could you list your Home and CAS settings (even though I don't think the latter actually affects anything, may as well be safe) for which the plotting does not work?

Han, I checked the date on the calculator itself and you are right. An older version
of Graph3D (1-Jan - 2014) was there. I will follow your instructions and let you
know if that fixed the problem. Thanks for your help.

I reloaded the 8-JAN-2014 version and this time it worked. The program works
fine with the Complex box checked for functions with singularities.
Thanks again for your help.
Find all posts by this user
Quote this message in a reply
01-10-2014, 12:50 AM
Post: #38
RE: GRAPH 3D v2.2 (beta, now with trace)
For those who find the slower rendering a bit too slow for your liking, you can make a minor modification to the code in order to change the rotation to a "box-only" rotation in the same sense as moving a program window in Windows and seeing only the rectangular border move until the window is "placed" somewhere new on the desktop and the contents of the window are finally rendered.

In the function g3D_keys() change the code
Code:

        if key==3 then rotx:=(rotx-5) MOD 360; end;
        if key==45 then zoom3D:=max(zoom3D/1.05,.01); end;
        if key==50 then zoom3D:=zoom3D*1.05; end;
      end;
      g3D_rotmatrix();
      g3D_draw(); // <------------- change this line
    until NOT iskeydown(key);
                   // <------------- and change this line
    end;

to

Code:

        if key==3 then rotx:=(rotx-5) MOD 360; end;
        if key==45 then zoom3D:=max(zoom3D/1.05,.01); end;
        if key==50 then zoom3D:=zoom3D*1.05; end;
      end;
      g3D_rotmatrix();
      rect(G1); g3D_drawbox(); blit_p(G0,G1); // <---------- to this
    until NOT iskeydown(key);
    g3D_draw(); // <-------- and to this
    end;

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
01-11-2014, 04:33 PM
Post: #39
RE: GRAPH 3D v2.2 (beta, now with trace)
(01-08-2014 03:07 PM)Miguel Toro Wrote:  Hello Terje,

Could you please explain more in details the steps for the procedure to transfer the program using the ConnKit.

Thank you and regards,

Miguel

Miguel,

When you run the Connectivity Kit you will see some tabs on the left hand side of the window. The upper one is Calculators and you should find your calculator's name at the top of the list when you choose that tab. Clicking on the calculator and then on the A Application Library you can either add, or as in my case, click on the "Graph3D" App. This will open another window with tabs along the top, choose the Program tab and copy and paste Han's text version of the program here. Now save by clicking the button in the upper left corner of the CK window.

If you had the calculator in the program catalog when saving, a good indication that the file has been transferred is that the calculator switches to home view. You can now open the Graph3D program in the Program Catalog and do a Check to see all is ok.

Whilst this method worked for me, I do not know whether it is an any more secure method than creating the App on the CK Content tab and use Send to Class. However, it is not more work than that method so probably swings and roundabouts.

Cheers, Terje
Find all posts by this user
Quote this message in a reply
01-21-2014, 09:44 PM
Post: #40
RE: GRAPH 3D v2.2 (beta, now with trace)
I have downloaded the program and followed step by step instructions on how to install it and everytime i try to use it it says Error: Invalid object. I am typing it in exactly as you have it on your video. I also have updated my Firmware to the most recent as well. I checked the program on the calculator and i get errors too. is that normal? I opened it with wordpad like you said and copied and pasted it into the programming part after i went into apps copied the advanced graphing and renamed it Graph3D. Any suggestions?
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 3 Guest(s)