Archive: AVS Questions...


7th March 2003 23:10 UTC

AVS Questions...
Yessir, I have questions.

1) Are multiscopes (Multiple scopes crammed into one) faster, slower, or just about the same speed as syncing scopes?

2) Colormaps are faster than colorclips, right? From this, I have one question so that I can use colormap to replace multi clips - How can I define exact positions (red at 192, green at 60, etc)? (No rulers, please...)

3) Is there any shortcut to correctly clip objects behind a rotating cube other than using 3 planes and their opposites?

4) What is the dx, dy, dz, k, final x, and final y for simple objects? (cylinder, sphere, cone, plane, circle, cube, add more if you want...) (And I mean raytracing...) (dx, dy, dz, k, final x, final y, and final edits of ix,iy, and iz are the things that actually shape the object, right?) (Now that I typed that, I realized that this is a bit too much to ask...)

5) Is there any shortcut to rotating and object while the scene itself rotates?

All I can think for now. Might be more later...


7th March 2003 23:54 UTC

Multiscopes may be faster or slower depending on how they are able to be coded. If it can be easily combined with little extra coding, then combining them is better, but if it would mean having to create a long list of x1=if(equal(fr,1),xx1,x1);... then it may be faster if more than one SSC is used.


8th March 2003 00:56 UTC

Q2, i been fooling with these for a while but i don think you can get exact positions, so i ussally guess and tweak until its looks like what i started out with


8th March 2003 01:59 UTC

Erm, two more questions that I forgot :

6) Is sqr(n) faster than n*n?
7) Is pow(n,a) faster than n*n*n...*n?


8th March 2003 07:38 UTC

I would say that pow(n,a) is much faster than the brute force n*n*n*n
method since I calculates it all at once instead of calculating it like

n*n=product*n=product...
It will do it microseconds quicker though.

This is just my uneducated standpoint,

You do advanced maths and advanced english like me in High School and are still faced with the realisation that you are stupid. :( :D


8th March 2003 23:21 UTC

dx ,dy,dz are custom variables that help create the object yeah :) The k variable is usualy knows as the texture variable(as far as i know).Its the most important.Look in nixa`s new pack for DMs that contain it...Maybe you`ll figure it.I didnt :)


8th March 2003 23:35 UTC

For a plane, I believe it's merely a normal 3d rotation with deletion of the other plane (dx=x;dy=y;dz=number;k=d;normal x=ix/iz,y=iy/iz) while circular plane is where x is the d of the plane, y is the r (x=d;y=r movement, in short :) )
For cylinder, dz=d, x=newR, y=something I believe...
cube is just intersection of 6 planes (For inside view, just use a plane and its opposite - only 3);
sphere can just use x=d;y=r I guess...

Dunno how to put them all together tho :p


9th March 2003 01:30 UTC

well...according to unconed the functions are faster, however, normally the expansions are faster (except, of course, for decimal powers)
colormaps are faster, but you can't get the exact positions without (in the words of unconed himself) hacking the clf file


9th March 2003 01:35 UTC

sqr(x) is the same speed as x*x I believe. pow(x,3) is faster than x*x*x.


9th March 2003 12:31 UTC

About #4(rayracing), here are some formulas(you can find more at wolfram.mathworld.com):
plane: a1*x+a2*y+a3*z+a4=0; a1,a2,a3,a4 determine the position of the plane in 3D space.
cylinder: x^2+y^2=r^2; r is the radius.
sphere: x^2+y^2+z^2=r^2; r is the radius.
cylinder(whith an elipse as a base): (x/a)^2+(y/b)^2=1; a,b are something like x and y radiuses for the elipse.
cone: x^2+y^2=z*r+a; r-cone radius at z=1+a plane,(0,0,a)-coordinates of the cone top
hyperboloid: (x/a)^2+(y/b)^2-(z/c)^2=1;

Now you raytrace thease like Unconed explained somewhere at the troubleshooting forum.


9th March 2003 21:48 UTC

pow is almost always slower than n*n*n... because pow(x,y) is calculated as exp(log(x)*y) and is meant for non-integer powers.

sqr is faster than n*n because it doesn't use two memory fetches, though with proper caching it shouldn't make much of a difference.


10th March 2003 01:13 UTC

so does that mean n*sqrt(n)*sqrt(sqrt(n))... is faster than pow(n,1+1/2+1/4...)? (i'm guessing not, because pow(a,b) is of a relatively constant speed, whereas the expantion of n^(1+1/2+1/4...) with functions becomes increasingly slower...)


10th March 2003 20:14 UTC

1+1/2+1/4+...(1/n)^2=1/(1-1/2)=2*(1-2^(-n-1))=2-2^(-n) so the fastest way to calculate this is pow(x,2-pow(2,-n)) if you want the series to go to infinety lim(2-2^(-n))=2 so you will have sqr(x)


10th March 2003 23:03 UTC

i know nixa, but my question wasn't about the infinite series, just whether n*sqrt(n) was faster or slower than pow(n,1.5), or n*sqrt(n)*sqrt(sqrt(n) was faster/slower than pow(n,1.75), etc.


11th March 2003 03:20 UTC

That's similar to what I was trying to say Atero. For really complicated statements pow() will be quicker, but for simple statements it will not be. Also, sometimes pow() is necessary; for example, if you want to have 2^n.