Author Topic: Features Wishlist  (Read 683552 times)

0 Members and 3 Guests are viewing this topic.

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: Features Wishlist
« Reply #2670 on: October 26, 2011, 07:35:49 pm »
I am experimenting with video signal generation. It would be nice if there was support XD
If you like my work: why not give me an internet?








Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Features Wishlist
« Reply #2671 on: October 26, 2011, 07:43:57 pm »
Support for video signal generation? o.O I think this is not really something many games would use, and would be much better suited for an Axiom.  What kind of video signal are you even working with?

Offline C0deH4cker

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 258
  • Rating: +11/-1
    • View Profile
    • iNinjas Forum/Repo
Re: Features Wishlist
« Reply #2672 on: October 27, 2011, 10:50:46 pm »
Or 'Token string here'

Offline Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: Features Wishlist
« Reply #2673 on: October 28, 2011, 12:22:31 am »
This is an idea that was kicked around on IRC which I cannot take credit for, but felt needed mentioning before it was forgotten [/disclaimer]:
Autostore.
The idea is an extension onto the concept of ++ and --. Basically, you would type in, say, A+=2, and A would increase by 2. Type in A*=2, and it doubles. A-=3 will decrease A by 3, and so on and so forth.
(this is just one possible syntax, but it seemed to have the most support in the discussion)
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!

Offline MGOS

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +95/-0
    • View Profile
Re: Features Wishlist
« Reply #2674 on: October 28, 2011, 12:24:48 am »
Yeah, that would make things a lot easier - same syntax like C++.

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: Features Wishlist
« Reply #2675 on: October 30, 2011, 08:50:40 am »
Freq(WAVE,OFFSET,TIME
The starting position of the wave.
Normal wave produced by freq:
______         _______
      |       |       |
      |       |       |
      |_______|       |______ etc.

Wave starting at 1/4 wave
__         _______        ___ etc.
  |       |       |      |
  |       |       |      |
  |_______|       |______|

Say the wave is 200 then the wave starts at 50



Value must be within the domain[0,WAVE]

Makes sound blending easier and sound better!
If you like my work: why not give me an internet?








Offline mushmoom

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 119
  • Rating: +4/-1
  • THE EMINENT
    • View Profile
Re: Features Wishlist
« Reply #2676 on: November 02, 2011, 07:08:04 pm »
I think Axe needs trig functions because if I had to say: calculate and simulate the trajectory of an object, it would take a lot more memory to program each function and its values.
the inner machinations of my mind are an enigma...


Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Features Wishlist
« Reply #2677 on: November 02, 2011, 07:22:33 pm »
It does have sin( and cos(

unfortunately, it would be extremely inefficient to do any other ones.
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Features Wishlist
« Reply #2678 on: November 02, 2011, 07:46:29 pm »
I think Axe needs trig functions because if I had to say: calculate and simulate the trajectory of an object, it would take a lot more memory to program each function and its values.

You don't need much Trig at all to compute the trajectory of an object, and Axe already has Sin and Cos, which should be more than enough :)
« Last Edit: November 02, 2011, 07:46:42 pm by Builderboy »

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: Features Wishlist
« Reply #2679 on: November 03, 2011, 10:14:49 am »
But sin(x) has only 3 possible values: -1, 0 and 1
(or does axe use another method?)
If you like my work: why not give me an internet?








Offline MGOS

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +95/-0
    • View Profile
Re: Features Wishlist
« Reply #2680 on: November 03, 2011, 10:52:26 am »
sin(x) returns a value between -127 and 127, where x is between 0 and 255. So if you want to get the sine of 90°, you type sin(64) and get 127.
It's the same with the cosine function.
If you want to plot the points on a circle with radius 10, you think of a number you have to divide 127 to get 10, which is about 13.
You also have to add the Center coordinates.
Code: [Select]
For(I,0,255)
sin(I)//13+20->Y
cos(I)//13+20->X
Pxl-On(X,Y)
End
« Last Edit: November 03, 2011, 10:59:13 am by MGOS »

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: Features Wishlist
« Reply #2681 on: November 03, 2011, 10:55:46 am »
But sin(x) is very slow right? Does it use a LUT or an approximation algorithm? When you only need like 16 directions is it better to use a LUT?
« Last Edit: November 03, 2011, 10:56:03 am by Keoni29 »
If you like my work: why not give me an internet?








Offline MGOS

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +95/-0
    • View Profile
Re: Features Wishlist
« Reply #2682 on: November 03, 2011, 11:01:09 am »
I don't know which kind of routine is used. I once programmed a piston engine-simulation with sin and cos and that was pretty fast.

And if you do always the same calculation with the sin/cos values, I think it is better to use a LUT for only these 16 values.
« Last Edit: November 03, 2011, 11:03:09 am by MGOS »

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Features Wishlist
« Reply #2683 on: November 03, 2011, 03:46:24 pm »
Not sure what algorithm it is, but it's definitely an algorithm (not a lookup table, which would be huge for 256 possible input values). If you don't need it to be too exact, a lookup table would probably be faster.




Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Features Wishlist
« Reply #2684 on: November 03, 2011, 05:05:24 pm »
The sin and cos routines are very fast, about the speed of doing one multiplication (because that's essentially what it does).  It uses the fact that sin(x) when x is in the range [0 to 180 degrees] has a hump that is approximately a parabola.  For the domain and range that I'm using in Axe, sin(x) is approximately: x*(128 - x)/32.  This is then just replicated with alternating sign periodically.

A look-up table is always faster, they are even faster than regular multiplication.  If you have 16 values, then done right it could be slightly faster and about the same size to use a look-up table, but you have to be good at Axe optimization to achieve this.  However, unless you are computing sin and cos more than 1000 times per second, I wouldn't even bother because it won't make a difference.
« Last Edit: November 03, 2011, 05:07:21 pm by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!