* WalrusIRC

You need to have 5 posts and not be part of restricted usergroups in order to use the WalrusIRC embedded shoutbox. However, you can also access our IRC channel called #CodeWalrus via EFnet.

Author Topic: HP Prime Programming Help  (Read 2240 times)

0 Members and 1 Guest are viewing this topic.

Offline alexgt

  • Just your friendly neighborhood Ninja Stach Fancy Iron Man
  • Super User
  • Join Date: Dec 2014
  • Location: Behind you
  • Posts: 2611
  • Post Rating Ratio: +6/-1
  • Something should go here...
    • /u/alexgt9123
  • Gender: Male
HP Prime Programming Help
« on: January 24, 2016, 03:55:24 am »
This is a cross post from HP Museum:
Quote
I have a question about the LINE_P and TRIANGLE_P commands. Both of them have optional advanced syntax, the help hints that it can be used for 3D functions and the such!! I have a hard time understanding the help on it is could someone could show me and give an example, the help is very appreciated ;)
So basicly I think there is already built in 3D functions for LINE_P() and TRIANGLE_P() O.O *.* O.O
(3D MinePrime here I come!!!)
It would be nice if @timwessman shed some light on the topic ;)

This is my first question here but feel free to post your own troubles ;)
« Last Edit: January 24, 2016, 03:57:00 am by alexgt »


  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Online xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18878
  • Post Rating Ratio: +99/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: HP Prime Programming Help
« Reply #1 on: January 24, 2016, 05:55:03 am »
Well, TRIANGLE_P has been around for a while already and is indeed a 3D command. There are probably some instructions somewhere, but of course to do proper 3D models you would need 3D knowledge and perhaps a way to convert blender models to calc. LINE_P got some 3D capabilities a while ago too but I assume it's for wireframe 3D. And there's also the FILLPOLY_P command which lets you draw a single polygon with an opacity level of your choice (and using a fullscreen polygon even lets you do fade-in/out animations.

The syntax for FILLPOLY_P is something like this:

Code: [Select]
FILLPOLY_P(G3,{{0,0},{320,0},{320,0},{320,0}}, #000000, 128);
TRIANGLE lets you draw multiple polygons (with some gradient IIRC) in one go, but it lacks opacity support.
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline alexgt

  • Just your friendly neighborhood Ninja Stach Fancy Iron Man
  • Super User
  • Join Date: Dec 2014
  • Location: Behind you
  • Posts: 2611
  • Post Rating Ratio: +6/-1
  • Something should go here...
    • /u/alexgt9123
  • Gender: Male
Re: HP Prime Programming Help
« Reply #2 on: January 24, 2016, 07:41:44 am »
Triangles have opacity now, and the help section on LINE_P and TRIANGLE_P expanded quite a lot, so the functions were probably there they just didn't show up in the help section. I could learn how to do it if I could find a example program somewhere though...
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Online xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18878
  • Post Rating Ratio: +99/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: HP Prime Programming Help
« Reply #3 on: January 24, 2016, 08:31:20 am »
Wait they do? O.O I didn't know that. Imagine how fast the 3D grapher app would be now. The author used TRIANGLE back when it lacked opacity and it ran fast, but then switched to FILLPOLY, which looked nicer, but the frame rate dropped since he needed to draw each polygon one by one.

What I am curious about is how does the triangle format compares to Blender format and stuff like that? That said, even if you got an actual 3D model to show up, it would just be a single color (or with a gradient), so TRIANGLE would be more suitable for simple objects such as a spaceship. FILLPOLY would probably be quite slow and polygon sorting done manually would be hard to implement (and even slower)

What I would be more interested in is if mode-7 would be fast enough in HP PPL.
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline alexgt

  • Just your friendly neighborhood Ninja Stach Fancy Iron Man
  • Super User
  • Join Date: Dec 2014
  • Location: Behind you
  • Posts: 2611
  • Post Rating Ratio: +6/-1
  • Something should go here...
    • /u/alexgt9123
  • Gender: Male
Re: HP Prime Programming Help
« Reply #4 on: January 24, 2016, 03:21:18 pm »
what is mode 7?!
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Offline SiphonicSugar

  • Full User
  • Join Date: Jun 2015
  • Location: Tennessee, United States
  • Posts: 251
  • Post Rating Ratio: +1/-1
  • Inspiration
    • siphonicsugar
    • @SiphonicSugar
    • SiphonicS
  • Gender: Male
Re: HP Prime Programming Help
« Reply #5 on: January 25, 2016, 04:11:17 am »
Lol

Is it kind of like Fix?
  • Calculators owned: TI-89, TI-84 Plus, TI-92, TI-84 Plus C SE, and TI-Nspire CAS with Touchpad
I'm just trying to grab some inspiration. :P

Offline alexgt

  • Just your friendly neighborhood Ninja Stach Fancy Iron Man
  • Super User
  • Join Date: Dec 2014
  • Location: Behind you
  • Posts: 2611
  • Post Rating Ratio: +6/-1
  • Something should go here...
    • /u/alexgt9123
  • Gender: Male
Re: HP Prime Programming Help
« Reply #6 on: January 26, 2016, 02:40:03 pm »
So here is a link that Hans @ hp museum gave me which help a lot.
http://www.hpmuseum.org/forum/thread-5122.html
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Online xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18878
  • Post Rating Ratio: +99/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: HP Prime Programming Help
« Reply #7 on: January 26, 2016, 05:30:06 pm »
Awesome. Speed-wise I think it should be fine, but it depends how many 3D models you need to draw.
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline alexgt

  • Just your friendly neighborhood Ninja Stach Fancy Iron Man
  • Super User
  • Join Date: Dec 2014
  • Location: Behind you
  • Posts: 2611
  • Post Rating Ratio: +6/-1
  • Something should go here...
    • /u/alexgt9123
  • Gender: Male
Re: HP Prime Programming Help
« Reply #8 on: January 26, 2016, 07:30:04 pm »
I was thinking 3D MinePrime soo probably 100+ triangles :P
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Online xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18878
  • Post Rating Ratio: +99/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: HP Prime Programming Help
« Reply #9 on: February 20, 2016, 07:08:03 am »
Wait @alexgt , are you planning to make Mineprime in 3D? Because that might be quite hard because of all blocks being individual blocks rather than just one big map model. It might be better to experiment with smaller stuff first (and finish Mineprime 2D) :P

Something I always wondered is if it's possible to display one massive polygon using FILLPOLY and still not have speed issues? Because then that could be a cheap way to get something that ressembles mode 7 (if you managed to make a GROB to polygon model converter, that is, which would probably be hard) and you could probably use multiple polygon models superposed on each others (since FILLPOLY only allows 1 color at a time) so it would look like a mode 7 map.

It might be worth it to attempt mode 7 without FILLPOLY, though, in case that is fast enough.
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline alexgt

  • Just your friendly neighborhood Ninja Stach Fancy Iron Man
  • Super User
  • Join Date: Dec 2014
  • Location: Behind you
  • Posts: 2611
  • Post Rating Ratio: +6/-1
  • Something should go here...
    • /u/alexgt9123
  • Gender: Male
Re: HP Prime Programming Help
« Reply #10 on: February 22, 2016, 12:59:41 pm »
I don't really understand what mode 7 is :P

I will hopefully make a 3D MinePrine game in the future but nothing near as extensive as Crafti, it would be more of a proof of concept
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

 


You can also use the following HTML or bulletin board code to share it on your page or forum signature!


Also do not forget to check our affiliates below.
Planet Casio TI-Planet Calc.news BroniesQC BosaikNet Velocity Games