Author Topic: Formulum: Texas Instruments Version  (Read 27427 times)

0 Members and 1 Guest are viewing this topic.

ASHBAD_ALVIN

  • Guest
Re: Formulum: Texas Instruments Version
« Reply #75 on: October 31, 2010, 09:13:26 am »
you can do it in TI-basic, not terribly hard but not super easy either.  Basically, you have a menu that draws the options starting at a cutoof and 6-7 more after that.  I did something like this before ;)

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Formulum: Texas Instruments Version
« Reply #76 on: October 31, 2010, 09:27:03 am »
Just googled it, it's easy, will upload it today :)

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Formulum: Texas Instruments Version
« Reply #77 on: October 31, 2010, 12:14:30 pm »
Code: [Select]
Okay, I'm kind of stuck now, I don't know if I should do a custom menu like this:

[code]:AxesOff
:ClrDraw
:Text(1,1,"CHOOSE FORMULA
:Text(7,1,"1:CIRCLE AREA
:Text(14,1,"2:SPHERE VOL.
:Text(21,1,"3:CYLINDER VOL.
:Text(28,1,"4:CONE VOL.
:Text(35,1,"5:CONE SURFACE AREA
:Text(42,1,"6:QUADR. PYR. VOL.
:Text(49,1,"7:CYLINDER SURFACE AREA
:Text(56,1,"8:MORE FORMULAS
:Repeat 2>abs(5-abs(5-abs(Ans-83
:getKey
:End
:If Ans=92
:Disp "CIRCLE AREA
:If Ans=94
:Disp "SPHERE VOL.
:If Ans=82
:Disp "CYLINDER VOL.
:If Ans=83
:Disp "CONE VOLUME
:If Ans=84
:Disp "CONE SURFACE AREA
:If Ans=85
:Disp "QUADR. PYR. VOLUME
:If Ans=86
:Disp "CYLINDER SURFACE AREA
:Stop
:If Ans=87
::AxesOff
:ClrDraw
:Text(1,1,"CHOOSE FORMULA
:Text(7,1,"1:SPHERE SURFACE AREA
:Text(14,1,"2:CUBE VOL.
:Text(21,1,"3:CUBE SURFACE AREA
:Text(28,1,"4:PARALLELEPIPED VOL.
:Text(35,1,"5:PARALLELEPIPED SURFACE AREA
:Text(42,1,"6:TRAPEZIUM AREA
:Text(49,1,"7:RECTANGLE AREA
:Text(56,1,"8:MORE FORMULAS
:Repeat 2>abs(5-abs(5-abs(Ans-83
:getKey
:End
:If Ans=92
:Disp "SPHERE SURFACE AREA
:If Ans=94
:Disp "CUBE VOLUME
:If Ans=82
:Disp "CUBE SURFACE AREA
:If Ans=83
:Disp "PARALLELEPIPED VOL.
:If Ans=84
:Disp "PARALLELEPIPED SURFACE AREA
:If Ans=85
:Disp "TRAPEZIUM AREA
:If Ans=86
:Disp "RECTANGLE AREA
:If Ans=87
:Disp "MORE FORMULAS"

This is not working very well, no, not working very good, please try it with SourceCoder I really need help.

So, with a Menu Function, I tried to do this:
Code: [Select]
:ClrHome
:Menu("CHOOSE FORMULA","CIRCLE AREA",1,"SPHERE VOL.",2,"CYLINDER VOL.",3,"CONE VOL.",4,"QUADR PYR VOL.",5,"SPHERICAL SRFCE AREA",6,"MORE FORMULAS",7
:Lbl 1
:Prompt R
:Output(4,2,"AREA IS:":Output(5,2,RRπ
:Stop
:Lbl 2
:Prompt R
:Output(4,2,"VOLUME IS:":Output(5,2,(4/3)πRRR
:Stop
:Lbl 3
:Prompt R,H
:Output(4,2,"VOLUME IS:":Output(5,2,RRπH
:Stop
:Lbl 4
:Prompt R,H
:Output(4,2,"VOLUME IS:":Output(5,2,(RRπH)/3
:Stop
:Lbl 5
:Prompt L,H
:Output(4,2,"VOLUME IS:":Output(5,2,LLH/3
:Stop
:Lbl 6
:Prompt R
:Output(4,2,"SURFCE AREA IS:":Output(5,2,4πRR
:Lbl 7
:Menu("CHOOSE FORMULA","CONE SURFACE AREA",1,"CYLINDER SURFACE AREA",2,"CUBE VOL.",3,"CUBE SURFACE AREA",4,"PARALLELEPIPED VOL.",5,"PARALLELEPIED SURF. AREA",6
:Lbl 1
:Disp "CONE SURFACE AREA"

On this one, the labels for the second menu are used as the ones in the first menu.


Ideas? Thanks much[/code]
« Last Edit: October 31, 2010, 12:19:42 pm by ScoutDavid »

ASHBAD_ALVIN

  • Guest
Re: Formulum: Texas Instruments Version
« Reply #78 on: October 31, 2010, 12:19:22 pm »
I say just stick with the later one with the two menus for now.  It looks professional, and won't leave your graphscreen in a mess.

Offline JosJuice

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1344
  • Rating: +66/-14
    • View Profile
Re: Formulum: Texas Instruments Version
« Reply #79 on: October 31, 2010, 12:29:56 pm »
On this one, the labels for the second menu are used as the ones in the first menu.


Ideas? Thanks much
Menu( and Goto will always skip to the first label that has the correct name. Make sure that there are no labels that share the same same.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Formulum: Texas Instruments Version
« Reply #80 on: October 31, 2010, 12:32:35 pm »
Code: [Select]
:ClrHome
:Menu("CHOOSE FORMULA","CIRCLE AREA",1,"SPHERE VOL.",2,"CYLINDER VOL.",3,"CONE VOL.",4,"QUADR PYR VOL.",5,"SPHERICAL SRFCE AREA",6,"MORE FORMULAS",7
:Lbl 1
:Prompt R
:Output(4,2,"AREA IS:":Output(5,2,RRπ
:Stop
:Lbl 2
:Prompt R
:Output(4,2,"VOLUME IS:":Output(5,2,(4/3)πRRR
:Stop
:Lbl 3
:Prompt R,H
:Output(4,2,"VOLUME IS:":Output(5,2,RRπH
:Stop
:Lbl 4
:Prompt R,H
:Output(4,2,"VOLUME IS:":Output(5,2,(RRπH)/3
:Stop
:Lbl 5
:Prompt L,H
:Output(4,2,"VOLUME IS:":Output(5,2,LLH/3
:Stop
:Lbl 6
:Prompt R
:Output(4,2,"SURFCE AREA IS:":Output(5,2,4πRR
:Lbl 7
:Menu("CHOOSE FORMULA","CONE SURFACE AREA",1,"CYLINDER SURFACE AREA",2,"CUBE VOL.",3,"CUBE SURFACE AREA",4,"PARALLELEPIPED VOL.",5,"PARALLELEPIED SURF. AREA",6
:Lbl 1
:Disp "CONE SURFACE AREA"

Then, I should use this one which is simpler.

Hahahah, I did it!!!

Code: [Select]
:ClrHome
:Menu("CHOOSE FORMULA","CIRCLE AREA",1,"SPHERE VOL.",2,"CYLINDER VOL.",3,"CONE VOL.",4,"QUADR PYR VOL.",5,"SPHERICAL SRFCE AREA",6,"MORE FORMULAS",7
:Lbl 1
:Prompt R
:Output(4,2,"AREA IS:":Output(5,2,RRπ
:Stop
:Lbl 2
:Prompt R
:Output(4,2,"VOLUME IS:":Output(5,2,(4/3)πRRR
:Stop
:Lbl 3
:Prompt R,H
:Output(4,2,"VOLUME IS:":Output(5,2,RRπH
:Stop
:Lbl 4
:Prompt R,H
:Output(4,2,"VOLUME IS:":Output(5,2,(RRπH)/3
:Stop
:Lbl 5
:Prompt L,H
:Output(4,2,"VOLUME IS:":Output(5,2,LLH/3
:Stop
:Lbl 6
:Prompt R
:Output(4,2,"SURFCE AREA IS:":Output(5,2,4πRR
:Lbl 7
:Menu("CHOOSE FORMULA","CONE SURFACE AREA",8,"CYLINDER SURFACE AREA",9,"CUBE VOL.",10,"CUBE SURFACE AREA",4,"PARALLELEPIPED VOL.",11,"PARALLELEPIED SURF. AREA",12
:Lbl 8
:Disp "TEST SUCCESS"

So happy:)

Offline FinaleTI

  • Believe in the pony that believes in you!
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1830
  • Rating: +121/-2
  • Believe in the pony that believes in you!
    • View Profile
    • dmuckerman.tumblr.com
Re: Formulum: Texas Instruments Version
« Reply #81 on: October 31, 2010, 12:38:13 pm »
Try this code:
Code: [Select]
:AxesOff
:ClrDraw
:1→W
:While W
:While W=1
:Text(1,1,"CHOOSE FORMULA
:Text(7,1,"1:CIRCLE AREA
:Text(14,1,"2:SPHERE VOL.
:Text(21,1,"3:CYLINDER VOL.
:Text(28,1,"4:CONE VOL.
:Text(35,1,"5:CONE SURFACE AREA
:Text(42,1,"6:QUADR. PYR. VOL.
:Text(49,1,"7:CYLINDER SURFACE AREA
:Text(56,1,"8:MORE FORMULAS
:Repeat 2>abs(5-abs(5-abs(Ans-83
:getKey
:End
:Ans→K
:If K=73
:Then
:ClrDraw
:2→W
:Else
:If K=92
:Disp "CIRCLE AREA
:If K=93
:Disp "SPHERE VOL.
:If K=94
:Disp "CYLINDER VOL.
:If K=82
:Disp "CONE VOLUME
:If K=83
:Disp "CONE SURFACE AREA
:If K=84
:Disp "QUADR. PYR. VOLUME
:If K=72
:Disp "CYLINDER SURFACE AREA
:Stop
:End
:End
:While W=2
:Text(1,1,"CHOOSE FORMULA
:Text(7,1,"1:SPHERE SURFACE AREA
:Text(14,1,"2:CUBE VOL.
:Text(21,1,"3:CUBE SURFACE AREA
:Text(28,1,"4:PARALLELEPIPED VOL.
:Text(35,1,"5:PARALLELEPIPED SURFACE AREA
:Text(42,1,"6:TRAPEZIUM AREA
:Text(49,1,"7:RECTANGLE AREA
:Text(56,1,"8:MORE FORMULAS
:Repeat 2>abs(5-abs(5-abs(Ans-83
:getKey
:End
:Ans→K
:If K=73
:Then
:1→W
:ClrDraw
:Else
:If K=92
:Disp "SPHERE SURFACE AREA
:If K=93
:Disp "CUBE VOLUME
:If K=94
:Disp "CUBE SURFACE AREA
:If K=82
:Disp "PARALLELEPIPED VOL.
:If K=83
:Disp "PARALLELEPIPED SURFACE AREA
:If K=84
:Disp "TRAPEZIUM AREA
:If K=72
:Disp "RECTANGLE AREA
:Stop
:End
:End
:End

To quit, press ON to break it. One of the main reasons the above code didn't work it because you had the wrong key-codes in your If statements. I didn't know if it was supposed to loop back or not, but you can change that or add in another While W= loop with more formulas. Another thing that went wrong was before the If that created the second menu you had your Stop statement, which would end program execution.
If you want your If statements to do more than one thing, you'll need to use and If Then structure.
Code: [Select]
:If (Condition)
:Then
:(Do Whatever)
:End


Spoiler For Projects:

My projects haven't been worked on in a while, so they're all on hiatus for the time being. I do hope to eventually return to them in some form or another...

Spoiler For Pokemon TI:
Axe port of Pokemon Red/Blue to the 83+/84+ family. On hold.

Spoiler For Nostalgia:
My big personal project, an original RPG about dimensional travel and a few heroes tasked with saving the world.
Coding-wise, on hold, but I am re-working the story.

Spoiler For Finale's Super Insane Tunnel Pack of Doom:
I will be combining Blur and Collision Course into a single gamepack. On hold.

Spoiler For Nostalgia Origins: Sky's Story:
Prequel to Nostalgia. On hold, especially while the story is re-worked.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Formulum: Texas Instruments Version
« Reply #82 on: October 31, 2010, 12:43:19 pm »
Try this code:
Code: [Select]
:AxesOff
:ClrDraw
:1→W
:While W
:While W=1
:Text(1,1,"CHOOSE FORMULA
:Text(7,1,"1:CIRCLE AREA
:Text(14,1,"2:SPHERE VOL.
:Text(21,1,"3:CYLINDER VOL.
:Text(28,1,"4:CONE VOL.
:Text(35,1,"5:CONE SURFACE AREA
:Text(42,1,"6:QUADR. PYR. VOL.
:Text(49,1,"7:CYLINDER SURFACE AREA
:Text(56,1,"8:MORE FORMULAS
:Repeat 2>abs(5-abs(5-abs(Ans-83
:getKey
:End
:Ans→K
:If K=73
:Then
:ClrDraw
:2→W
:Else
:If K=92
:Disp "CIRCLE AREA
:If K=93
:Disp "SPHERE VOL.
:If K=94
:Disp "CYLINDER VOL.
:If K=82
:Disp "CONE VOLUME
:If K=83
:Disp "CONE SURFACE AREA
:If K=84
:Disp "QUADR. PYR. VOLUME
:If K=72
:Disp "CYLINDER SURFACE AREA
:Stop
:End
:End
:While W=2
:Text(1,1,"CHOOSE FORMULA
:Text(7,1,"1:SPHERE SURFACE AREA
:Text(14,1,"2:CUBE VOL.
:Text(21,1,"3:CUBE SURFACE AREA
:Text(28,1,"4:PARALLELEPIPED VOL.
:Text(35,1,"5:PARALLELEPIPED SURFACE AREA
:Text(42,1,"6:TRAPEZIUM AREA
:Text(49,1,"7:RECTANGLE AREA
:Text(56,1,"8:MORE FORMULAS
:Repeat 2>abs(5-abs(5-abs(Ans-83
:getKey
:End
:Ans→K
:If K=73
:Then
:1→W
:ClrDraw
:Else
:If K=92
:Disp "SPHERE SURFACE AREA
:If K=93
:Disp "CUBE VOLUME
:If K=94
:Disp "CUBE SURFACE AREA
:If K=82
:Disp "PARALLELEPIPED VOL.
:If K=83
:Disp "PARALLELEPIPED SURFACE AREA
:If K=84
:Disp "TRAPEZIUM AREA
:If K=72
:Disp "RECTANGLE AREA
:Stop
:End
:End
:End

To quit, press ON to break it. One of the main reasons the above code didn't work it because you had the wrong key-codes in your If statements. I didn't know if it was supposed to loop back or not, but you can change that or add in another While W= loop with more formulas. Another thing that went wrong was before the If that created the second menu you had your Stop statement, which would end program execution.
If you want your If statements to do more than one thing, you'll need to use and If Then structure.
Code: [Select]
:If (Condition)
:Then
:(Do Whatever)
:End

That works really good, I would never find out about that.
Thanks so MUCH FinaleTI.

I will use this one as a base now haha

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Formulum: Texas Instruments Version
« Reply #83 on: October 31, 2010, 02:22:00 pm »
OKAY, here it goes. I still have to add full formula resolution like there is in the Nspire:



Also, I have to add ALL triangle formulas :)

I have to make something like a title when the program asks for data, like "SPHERICAL SURFACE AREA" on top of the window.

For now it is cool and already useful in tests.

Here it goes! FORMULUM (69).8xp

Tell me what you think :)

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Formulum: Texas Instruments Version
« Reply #84 on: October 31, 2010, 02:55:45 pm »
Another version of Formulum for NSpire, Formulum v2.2.

It is just like this one, but with a few more formulas AND the resolution had some updates too, better for tests, ooh yeah:




Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Formulum: Texas Instruments Version
« Reply #85 on: October 31, 2010, 03:02:06 pm »
New progress!

EDIT Double post ???
« Last Edit: October 31, 2010, 03:02:21 pm by DJ Omnomnimaga »

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Formulum: Texas Instruments Version
« Reply #86 on: October 31, 2010, 03:04:19 pm »
Oh my god, when I try to run it in a calculator, the result shows up fast and the program quits, instead of what happens in WabbitEmu...

No idea why?

Offline JosJuice

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1344
  • Rating: +66/-14
    • View Profile
Re: Formulum: Texas Instruments Version
« Reply #87 on: October 31, 2010, 04:42:24 pm »
Oh my god, when I try to run it in a calculator, the result shows up fast and the program quits, instead of what happens in WabbitEmu...

No idea why?
Try adding a Pause if you want the results to stay on the screen.

Are you using a shell?

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Formulum: Texas Instruments Version
« Reply #88 on: October 31, 2010, 04:47:41 pm »
Oh my god, when I try to run it in a calculator, the result shows up fast and the program quits, instead of what happens in WabbitEmu...

No idea why?
Try adding a Pause if you want the results to stay on the screen.

Are you using a shell?

I am using a "Stop" to keep the results. When I use Pause it gives me an error, the same as when I use a ":Return".

A Shell? Please explain :S

Offline JosJuice

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1344
  • Rating: +66/-14
    • View Profile
Re: Formulum: Texas Instruments Version
« Reply #89 on: October 31, 2010, 04:51:17 pm »
(Just for clarification, this is the 83+/84+ version, right? I know nearly nothing about the Nspire...)

Stop (and Return) will immediately end the program.
A shell is a program that launches programs; for example, DCS and MOS.