Archive: 3d Timescope (for AVS2.70)


10th October 2003 10:01 UTC

3d Timescope (for AVS2.70)
With the 256 variables of AVS2.70 (thank you, Justin!), I was finally able to make a 3d timescope. I'll tell you about some of the tricks used in the scopes.

It uses rounding to put the getspec data for 5 frequencies (gi0, gi1, gi2, gi3, gi4) in a single variable (g1):


Frame:

gi0=((getspec(0,0,0))*100)%100/100;
gi1=((getspec(0.05,0,0))*100)%100/100;
gi2=((getspec(0.1,0,0))*100)%100/100;
gi3=((getspec(0.2,0,0))*100)%100/100;
gi4=((getspec(0.3,0,0))*100)%100/100;

g1=gi0+gi1*100+gi2*10000+gi3*10000*100+gi4*10000*10000;


And then in pixel it puts all that getspec data in different variables (j4, j3, j2, j1, (j0)). j0 isn't actually created in the preset, it's included in the z1.


pixel:

j4=(j/10000/10000*100)%100/100;j4=if(above(j4*10000*10000,j),j4-0.01,j4);
j3=((j-j4*10000*10000)/10000/100*100)%100/100;j3=if(above(j3*10000*100,j-j4*10000*10000),j3-0.01,j3);
j2=((j-j3*10000*100-j4*10000*10000)/10000*100)%100/100;j2=if(above(j2*10000,j-j3*10000*100-j4*10000*10000),j2-0.01,j2);
j1=((j-j2*100*100-j3*10000*100-j4*10000*10000)/100*100)%100/100;j1=if(above(j1*100,j-j2*10000-j3*10000*100-j4*10000*10000),j1-0.01,j1);
j0=j-j1*100-j2*10000-j3*10000*100-j4*10000*10000;


I have a question though: how many digits can a variable hold? This preset goes from 0.01 to 10000000, but if you could use more, a lot more frequencies can be included.

Is it possible to do some kind of int() function, because the way I round the numbers (var*100)%100/100 requires an extra line in the section with j4, j3, j2 and j1, because it rounds. That means that when var=1.67, it rounds to 2, when I want 1. The line j4=if(above(j4*10000*10000,j),j4-0.01,j4); can fix that, but an int()-like function would be faster.

10th October 2003 10:16 UTC

i have no idea how that works but it looks great


10th October 2003 11:42 UTC

It looks neat :) Though would indeed be better with more frequencies. I can't help you with that though, my math level is very low. Sorry dude.


10th October 2003 12:12 UTC

Ah ha! Now I have an idea that will defeat UnConeD! >:]


10th October 2003 12:16 UTC

Yeah? You've seen his tokyo preset? Watch in on acko.net . If you defeat that, you're good :)


10th October 2003 23:45 UTC

damn, whenever i have good ideas someone else does them first....:|

anyway, nice, but it could be a bit bigger...i mean, you're only really using 5 frequencies*12 memory=60 positions (correct?), and you could nearly do all that in the old avs....


11th October 2003 00:09 UTC

maybe skupers is holding back the final (bigger) version for his pack?


11th October 2003 01:43 UTC

Did you have to stretch the page? :weird:


11th October 2003 10:32 UTC

Originally posted by UnConeD
Did you have to stretch the page? :weird:
Did doesn't look stretched on my computer...

Anyway, maybe you know how many digits a variable can hold.

11th October 2003 14:20 UTC

It's Whitecap in AVS! Remember Whitecap? By good ol' Andy O'Meara? Yup I remember this. Very cool :up: