Archive: Stupid question, need an answer


15th December 2004 18:01 UTC

Stupid question, need an answer
Hi,

I have a stupid question, and could use an answer(I probably should just search untill I find a preset containing what I want to do, but that seems really lazy(just copy their stuff).

So I thought I would just ask here.

For this example, let's say we're using texer 2.

If I want to have particles, or shapes rain down(one way only and out of sight), should I just write the code so that the particle falls down and out of sight? I wouldn't ask but I've noticed that when I try to make AVS do something it just can't do, it crashes.

I have to re-reference some tutorials, but here's what I mean.

Since the AVS world stops at -1 and 1, could I just make the movement stop at -2, or 2? Will that make it invisible? Or will AVS think I'm just a moron and compensate by having it stop at -1 or 1?


15th December 2004 21:06 UTC

making it to go below -1 or above 1 is really unneccessary because everything below or above those is out of the window/screen.


16th December 2004 09:19 UTC

but to answer your question: yes it will be invisible and if x=2, then it will be 2, not 1 (unless you use wrap)

try it with this example:


SSC
INIT:
n=1;
FRAME
t=t+.05;
reg01=sin(t)*2 // <- goes from -2 to 2

Text
$(reg01:2.2)

16th December 2004 10:01 UTC

yeah, i could have understood your question nolita but was too tired sorry :) wotl did it though, nice job on that. by the way, there is no wrap in a superscope, just in texer2, so be careful with that ;)


16th December 2004 12:12 UTC

yea, sorry about that, I was talking in general.
Another (minor) thing is that n can be better set to 0, just one of my automatisms to start a scope with :D


16th December 2004 17:02 UTC

you can just make your own wrap for superscopes etc..

x1=whatever;
x=if(above(abs(x1),1),
abs(x1)-abs(x1)%2-1,x1);

I just totally pulled that out my arse, theres no way it will work. But its still possible to do.


16th December 2004 17:25 UTC

Thankyou.

I'm working on some bitmaps in Painter. I'm making these drops of what could be water, and also bubbles. I'm making them expressly for use in texer2. I'm doing this because I have two concepts for visualizations. One involves dripping water, and the other involves a sort of fantasy marine scene with bubbles, well, bubbling up.

I'm using Painter for the bitmaps because I want them to be hand painted in feel. Also I find that things tend to look a bit(well, I think a lot) more realistic when I choose a light-source then paint each object by hand, rather than just using the gradient, which is effective, and can look very nice, but in the end people like myself just look and go "hmmm, nice gradient".

Long story short I need for these things to start off invisible(off camera) then become visible(either by streaming down, or bubbling up) then land invisbly(off camera again). I'm just glad that some folks were able to wrap their brains around my question.

I had read some posts which told people not to use anything higher or lower than 1 or -1 in their scopes because that's where the AVS world stops and starts, but they didn't clearly explain that if it's what you want then it's fine to do.

BTW, I read that multiplication is more efficient than division, and I think I also read that addition is more efficient than multiplication. It has something to do with the way computers work and how it takes longer to divide than multiply(hey it takes longer for me to divide than multiply, at least when I'm doing the math in my brain and not with a calculator, so since a computer's basically a synthetic brain, that makes perfect sense to me).

What I didn't have clarified is decimals, i.e. fractions. Since decimals are in my mind a kind of division, like how .75 = 75% of a whole = 3/4 of a whole, it seems like it's division to me. So my new question is, are decimals, though necessary for detailed scopes and more than likely other things as well, well, are they less efficient than whole numbers?


19th December 2004 14:18 UTC

AVS treats all number as reals, so using integers has no effect on speed whatsoever.

PS: Usually when one asks a question, you expect an answer. Please think of a more descriptive subject next time.


20th December 2004 05:32 UTC

I'm sorry:(

I wasn't asking about intergers in that last post however. I was asking about decimals. So did you type intergers meaning decimals?


20th December 2004 13:10 UTC

either way, AVS sees no difference.

.75=
3/4=
0.75=
0.75000000000000000000000000000 etc

it's just that 3/4 is slower than .75 because of the division it has to perform. the others are equal in every single way


20th December 2004 15:07 UTC

reals are what you call decimals.


20th December 2004 15:34 UTC

17 in decimal means the numbers after each other mean this:


10^1*7+10^0*1


The next things mean just the same value:


10001 in binary (2) ( 2^4*1+2^3*0+2^2*0+2^1*0+2^0*1 )
21 in the octagonal (8) ( 8^1*2+8^0*1 )
17 in decimal (10) ( 10^1*7+10^0*1 )
11 in hexadecimal (16) ( 16^1*1+16^0*1 )


These are all existing and used number systems, AVS uses the decimal system only.

21st December 2004 04:03 UTC

Thanks. Still clanging around, trying to get the hang of placing points. The info you gave really helps, because I'm just trying to make sure I don't write a code that translates to pure gibberish(my posts yeah pure gibberish, but I don't want that for my code).