Omnimaga

Calculator Community => TI Calculators => TI-BASIC => Topic started by: pokemonrules9 on February 22, 2012, 09:26:50 pm

Title: Graphing in Ti-Nspire Basic?
Post by: pokemonrules9 on February 22, 2012, 09:26:50 pm
My teacher approached me recently asking about a program for the nspire.  she showed me one program on the Ti-84 thats kind of hard to explain, but it basically had to do with graphing.  She asked me if I could do a similar program for the nspire, as it has to do with what we are currently learning.  Our class only has nspires, and she wants to make it interactive with the class.  I told her at first that it probably wouldn't be possible in the nspires basic language, but I told her I would look into it.  Does anyone have any types of ideas that I could go about doing such a thing?  I was considering trying in lua, but I wanted to see if there was an easier alternative.
Title: Re: Graphing in Ti-nSpire Basic?
Post by: cyanophycean314 on February 22, 2012, 09:34:54 pm
What exactly did it have to do with graphing?
Inequalities?
Conics?

Try to explain what graphing program it is and what it does, even if it's kinda hard to explain. Just give us something more specific than graphing.  ;)

If you're trying a Lua version of whatever it is, I could help.  :)
Title: Re: Graphing in Ti-nSpire Basic?
Post by: pokemonrules9 on February 22, 2012, 09:46:47 pm
Well, right now we are learning about population growth, and using matrices to find populations year after year. From what she briefly explained and showed me, i believe it would have to do with graphing a few points as a shape, and showing what happens to that shape after time? I think? I'm not really quite sure, so I'll send her an e-mail.  And i would definitely appreciate your help in lua, since I have only made a couple simple programs :P
Title: Re: Graphing in Ti-Nspire Basic?
Post by: willrandship on February 22, 2012, 10:57:26 pm
I know of a few ways to accomplish this.

Graphing stats: Have the program store the stats into two lists, and have the statistics page set up.

Graphing funcs: Have the program use define to define a y function, and have a graph page set up.

You can do regressions and then fetch the equation from the multi-string output to do one of the above, since that sounds sort of like what you're doing.

Oh, and this is in basic.
Title: Re: Graphing in Ti-Nspire Basic?
Post by: pokemonrules9 on March 17, 2012, 11:02:14 am
I got a pretty late response!  So this is what I have to do...

Spoiler For Spoiler:
"Identify a scaling factor, a rotation angle, and a translation amount in the x and y direction.
It makes a matrix involving those factors.
 
You have a matrix of ordered pairs (that form a kite for example)
The program applies to transformation matrix to that kite, and graphs it.
 
Pressing enter you get more kites, and you can see them scale down in size, rotate, and translate.  Eventually they converge to a set point."

It doesn't need to be exactly like this, but this is the general idea... Sound possible without using lua?
Title: Re: Graphing in Ti-Nspire Basic?
Post by: Spyro543 on March 17, 2012, 01:56:40 pm
Graphing funcs: Have the program use define to define a y function, and have a graph page set up.
I also have had this question. How could I use "define" to set up a y function?
Title: Re: Graphing in Ti-Nspire Basic?
Post by: jwalker on March 17, 2012, 05:34:32 pm
ive done quite a bit of ti-nspire basic, ill see what i can do
Title: Re: Graphing in Ti-Nspire Basic?
Post by: willrandship on March 18, 2012, 01:09:39 am
look for the define block in the second library page, the one separated into sections. That can be inserted in, or(I think this way is CAS only) I think you can just store an expression of undefined x variables into a y var that is set to show.

Also, matrix-based kite drawing can be approximated using lists and the graph viewer, since you can connect them with lines and those lines can go up, down, forward or backward. The line is traced through the list values, not in order of size.

ie:
{0,1,2,3} -> l1
{3,2,2,1} -> l2

set up would have a point at 0,3, one at 1,2, another at 2,2, and one at 3,1, with a line connecting them in that order. You can easily alter lists in basic, and this change will be reflected on the tables.

Unfortunately you can't use matrixes directly since the data table application doesn't let you use them. (How would you represent different number values, for example?)
Title: Re: Graphing in Ti-Nspire Basic?
Post by: Jonius7 on March 26, 2012, 09:41:30 am
Unfortunately you can't use matrixes directly since the data table application doesn't let you use them. (How would you represent different number values, for example?)

You can't?
I thought you could refer to the variable that the matrix is stored in (with also row number and column number) and then use that.
Title: Re: Graphing in Ti-Nspire Basic?
Post by: willrandship on March 28, 2012, 09:03:57 pm
I meant use it for plotting in the list/data app, not altering them or using them in general.

also, for altering them, if you store the appropriate size of list you only need row number.