271
TI-Nspire / Re: Electric Circuit Calculation
« on: November 09, 2018, 09:39:43 am »
Pretty much the only difference in the BASIC language is no real graphics functions on the nspire. The rest is pretty much the same.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to. 271
TI-Nspire / Re: Electric Circuit Calculation« on: November 09, 2018, 09:39:43 am »
Pretty much the only difference in the BASIC language is no real graphics functions on the nspire. The rest is pretty much the same.
272
TI-Nspire / Re: Electric Circuit Calculation« on: November 08, 2018, 09:53:07 pm »
Thanks for weighing in, Stefan, you are probably one of the most knowledgeable 68k/nSpire BASIC programmers here, so you'd really know what was feasible ^_^ And the link looks pretty useful.
273
Grammer / Re: Grammer 2-The APP« on: November 08, 2018, 09:49:11 am »
I have been cleaning up code and doing some optimizations and modifications. I probably broke something, but I wanted a backup.
Updates:
Features I want:
274
TI-BASIC / Re: Simple little character generation program.« on: November 04, 2018, 01:36:27 pm »
Then the next part is to train a neural network to generate an image based on those attributes !
Ijust recently started playing Pathfinder and my first thought was how useful a calc program could be for this. 275
TI Z80 / Hacked Lists!« on: November 04, 2018, 10:56:56 am »
So, fun fact: floating point numbers can be changed to a variable reference instead, kind of like a shortcut on your computer, and the OS doesn't verify it.
In assembly, when you are looking for a variable, you put a name in OP1 and use FindSym or ChkFindSym. Those names are 9 bytes, which is also the size of a float (not a coincidence-- it's part of why names are limited to 8 bytes). You can actually change the contents of a Real variable to such a name, and when you try to read it's value, it will instead return the value of the variable it points to. For example, change the bytes of the Real variable, A, from 008000000000000000 (the number 0) to 015D01000000000000 and when you read A, it will return the contents of L2. Or, since lists are just stored as a bunch of Real (or Complex) numbers, you can modify elements of the list to be pointers. In this way, you could read Str1, Str2, Str3,..., Str0 by reading an element of L1, which could be useful, occasionally Some things to note: You can't modify the contents of the original variable in this way. If A points to Str2, then "33"+A→A does not modify Str2. However, "33"+A will work like "33"+Str2. Storing the names of programs and appvars and whatnot isn't useful. Attached is a program that turns L1 into a 4-element list {L2,[A],Str1,L1}. Here is the source. You need to delete L1 first, my code wasn't reliably deleting it. Code: [Select] #define bcall(x) rst 28h \ .dw x
276
ASM / Re: eZ80 on calc?« on: November 02, 2018, 01:30:43 am »
Probably, though it would take some effort. Most instruction can use literal replacements, but labels and macros need some more advanced treatment.
277
ASM / Re: eZ80 on calc?« on: November 01, 2018, 10:53:28 pm »
I asked a little while ago, and as far as I know it doesn't exist yet.
278
Math and Science / Re: Efficient Plotting of Polynomials« on: October 29, 2018, 07:39:23 pm »
Your computation of f(x+1) is correct, but then you need to subtract f(x), so:
## \begin{aligned} f(x+1)-f(x)&=(x^{3}-x+3)-(x^{3}-3x^{2}+2x+3),\\ &=x^{3}-x+3-x^{3}+3x^{2}-2x-3,\\ &=-3x+3x^{2},\\ &=3x^{2}-3x.\\ \end{aligned} ## 279
Math and Science / Re: Efficient Plotting of Polynomials« on: October 29, 2018, 02:04:57 pm »
It is basically 3+2(x+1)-3(x+1)2+(x+1)3-(3+2x-3x2+x3) which should be 3x^2-3x (I hope).
280
Axe / Re: Painting Sprites from File/RAM« on: October 29, 2018, 10:58:21 am »
Try without the brackets. The way you are doing it is actually taking the data at Y0 as an address, but you want to use Y0 itself as an address.
281
Math and Science / Re: Efficient Plotting of Polynomials« on: October 29, 2018, 09:27:07 am »
For what it's worth, I did get it to work in TI-BASIC. My program only worked up to degree 8 polynomials (I could extend it; it was just a convenient size).
I'm on mobile atm and AFC, so I'll try to describe my code: What I did is I computed Y1(Xmin+K∆X), for k from 0 to 8, storing them to a list, then I recombined starting from the end (the last element is a function of all previous elements and itself) applying that sum. Then for efficiency, I clipped off any trailing zeros in L1. I started plotting from Xmin to Xmax with step of ∆X: Code: [Select] For(X,Xmin,Xmax,∆X Note that it doesn't work well for non-polynomials like sine and cosine, but it can do rough estimates. I'm also sure it would fail at poles. 282
Math and Science / Efficient Plotting of Polynomials« on: October 28, 2018, 10:32:12 pm »
Hi folks, I wanted to share a technique I came up with for evaluating sequential points of a polynomial, which is especially useful when you are drawing them. A naive approach would be evaluate the whole polynomial at each point, but the method I'll show you allows you to evaluate at a few points, and then for each subsequent point just use additions.
The basic premise is to use ##f(x)## as a starting point to get to ##f(x+1)##. For example, take ##f(x)=3+2x##. To get to ##f(x+1)##, all you have to do is add 2. Things get more complicated as you go to higher degree polynomials. For example, take ##f(x)=3+2x-3x^{2}+x^{3}##. Then to get to ##f(x+1)##, you need to add ##3x^{2}-3x##. However, you can go even further by finding how to get from ##3x^{2}-3x## to ##3(x+1)^{2}-3(x+1)##. Now comes the theory. Take ##f_{1}(x)=f(x+1)-f(x)## and ##f_{n+1}(x)=f_{n}(x+1)-f_{n}(x)##. Then ##f(x+1)=f(x)+f_{1}(x)## and ##f_{n}(x+1)=f_{n}(x)+f_{n+1}(x)##. ##\begin{aligned} f_{2}(x) &=f_{1}(x+1)-f_{1}(x),\\ &=(f(x+2)-f(x+1))-(f(x+1)-f(x)),\\ &=f(x+2)-2f(x+1)+f(x). \end{aligned}## ##\begin{aligned} f_{3}(x)&=f_{2}(x+1)-f_{2}(x),\\ &=(f(x+3)-2f(x+2)+f(x+1))-(f(x+2)-2f(x+1)+f(x)),\\ &=f(x+3)-3f(x+2)+3f(x+1))-f(x). \end{aligned}## And in general, ##f_{n}(x)=\sum_{k=0}^{n}{{n\choose k}(-1)^{k}f(x+n-k)}## If you set ##x=0##: ##f_{n}(0)=\sum_{k=0}^{n}{{n\choose k}(-1)^{k}f(n-k)}## So now let's take again, ##f(x)=3+2x-3x^{2}+x^{3}##. ##\begin{aligned} f(0)&=3,\\ f_{1}(0)&=f(1)-f(0)&=0,\\ f_{2}(0)&=f(2)-2f(1)+f(0)&=0,\\ f_{3}(0)&=f(3)-3f(2)+3f(1)-f(0)&=6,\\ f_{k>3}(0)&=0.\\ \end{aligned}## So what these values allow us to do, ##{3,0,0,6}##, is use a chain of additions to get the next value, instead of evaluating the cubic polynomial at each x: ##\begin{array}{rrrr} [&3,&0,&0,&6]\\ [&3,&0,&6,&6]\\ [&3,&6,&12,&6]\\ [&9,&18,&18,&6]\\ [&27,&36,&24,&6]\\ [&63,&60,&30,&6]\\ [&123,&90,&36,&6]\\ [&213,&126,&42,&6]\\ ... \end{array}## Basically, add the second element to the first, third element to the second, and fourth element to the third. The new value is the first. Repeat. So the next iteration would yield [213+126,126+42,42+6,6]=[339,168,48,6], and indeed, f(8)=339. I'd like to apologise for how garbled this is, I'm really tired. Also, you should note that for an n-th degree polynomial, you need to compute up to ##f_{n}(x)##, but everything after that is 0. 283
TI-Boy SE - Game Boy Emulator For TI-83+SE/84 / Re: Good Ti-Boy games?« on: October 17, 2018, 05:17:51 pm »
Earlier in the thread it is stated that some games just can't fit in the non-SE calcs. The Pokemon games are among those, so you are out of luck.
284
TI Calculators / Re: Unfinished TI-84 CE 3d Grapher (ICE)« on: October 16, 2018, 06:49:23 pm »
Wow, that's pretty cool!
285
ASM / Re: ASM Optimized routines« on: October 16, 2018, 06:33:14 pm »
Here is a decent arctangent routine that works on [0,1), so you'll have to do the work to extend it outside that range. It uses a small lookup table and linear interpolation.
Spoiler For Range Reduction: Code: [Select] atan8:
|
|