Post Reply 
Where to port a Prime graphical program to, to get a better visualization?
02-12-2019, 01:16 PM (This post was last modified: 02-12-2019 08:36 PM by Jean-Michel.)
Post: #1
Where to port a Prime graphical program to, to get a better visualization?
Hello

I have written a short program which takes benefit of the graphical capabilities of the HP Prime, but, unfortunately, the resolution of the screen does not allow the created pictures to be as crisp as wished (too much lines on the screen which becomes quickly almost dark).

Do you know on which software I could port this program, which could take benefit of the high resolution of a computer screen?
It could be an online software as Geogebra (first one which comes to mind, even if I do not the software in itself), as soon as it is possible to program it (any language welcome, program is short and simple).
I have thought to VBA language which I know good enough, but then couldn't find a software which supports this language and is able to display the graphs (e.g. no idea in which way MS Excel could do this).

For those who wonder what kind of program it is: it deals with multiplication tables, graphically represented by lines joining points (one point for the number and one for the result of the multiplication of this number by the one of the table). Results are sprayed around a circle, with a chosen modulo. For modulo 10, 2 x 8 = 16, line goes from point 2 to point 6.
Resulting graphs look like petal of flowers: one petal for table of "2", two for table of "3", etc.
The graphs become nice for modulo around 300, by looping from table "2" to "10" (for example) with a step of 0,01. It shows nicely how the generation of the petals works.
The Prime emulator shows it better than the hardware for obvious reaons of speed.
If one of you is interested, I could, of course, share this (quick and dirty) program.

Kind regards.
Find all posts by this user
Quote this message in a reply
02-12-2019, 03:15 PM
Post: #2
RE: Where to port a Prime gaphical program to, to get a better visualization?
Can you use the virtual prime (emulator)? Perhaps in large skin mode? Or just save the hp prime screen as a .png image, and use your favorite image program, (perhaps the freeware Irfanview), to resize it to whatever image size you like?

Can you use another CAS program, such as wxmaxima, (freeware), which has a pretty steep learning curve, might also work for you.

-Dale-
Find all posts by this user
Quote this message in a reply
02-12-2019, 08:44 PM
Post: #3
RE: Where to port a Prime graphical program to, to get a better visualization?
Thank you Dale.

I was not clear enough : there are not only a few pictures, but hundreds of them. Each step is a picture in itself. All of them make kind of a video while the program generates them.
The Prime emulator seems to have the same resolution, but with larger pixel (at least this is what I get).

Kind regards.
Find all posts by this user
Quote this message in a reply
02-13-2019, 07:12 AM
Post: #4
RE: Where to port a Prime graphical program to, to get a better visualization?
Hello,

PPL is only available on Prime (as far as I know), and other systems would certainely not have access to all the nice functions available in Prime...

So, what could you do?

Well, PPL can work on other "graphical objects" than the screen. And can create png/jpg files...

So, here is my advice. Modify your program to output your graphics on G1 (or other), dimention G1 to be higher res (1024*768)? and do a AFile("name.png"):= G1 to save the graphic as a png.

If you are in the emulator, you can directly see the file in %programData%/HPPrime/....

On the calc, you will have to send the app to the PC to get it.

Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
02-13-2019, 12:20 PM
Post: #5
RE: Where to port a Prime graphical program to, to get a better visualization?
Hello Cyrille

Thank you for your interesting answer. I will give it a try.

Nevertheless, I wonder if it really meets my needs.
As explained in my answer to DrD, I would prefer to get a "live" management of the pictures, as and when they are generated by the program. Each step of the program loop modifies the previously created image, and it is what I would like to see "live", with better resolution, not only frozen images.
In fact, there are so many images to create, that, by properly seting the step of the loop, and hence the speed, this makes a sort of video of the process.

More to say, as said in the tittle of the thread, I am ready to go to another platform than the Prime (or the emulator on PC), and port the PPL program to another language.

Kind regards.
Find all posts by this user
Quote this message in a reply
02-13-2019, 12:54 PM
Post: #6
RE: Where to port a Prime graphical program to, to get a better visualization?
You might try rewriting it in Python within a Jupiter notebook. Lots of visualisation options, and powerful math libraries like Numpy.
Find all posts by this user
Quote this message in a reply
02-13-2019, 03:47 PM
Post: #7
RE: Where to port a Prime graphical program to, to get a better visualization?
(Previously), I suggested using a different CAS. Specifically, wxmaxima. Your code algorithm should work in wxmaxima, if it works in ppl. You will just need to adjust the graphics to be syntactically acceptable. There are lots of examples to be found using most any search engine of choice. You can produce a single image with multiple graphics, or a collection of images, accordingly. The advantage is that you would have control over the displayed result, including full display screen, as you seem to be after.

I suppose you could also send a collection of images from the calc/emulator to a video editor, but there is only so much time in any given lifetime, with a lot of adventures unfulfilled ...
Find all posts by this user
Quote this message in a reply
02-14-2019, 07:23 AM
Post: #8
RE: Where to port a Prime graphical program to, to get a better visualization?
Hello,

You can always paint on a large G1 and blit G1 to G0 with stretch to see it as it is being calculated....

Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
Post Reply 




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