Archive: Superscope


14th April 2002 04:56 UTC

Superscope
in the visualization called "living in a box" there's a superscope that has peaks which are flat
does anyone know how to do that? cuase it's really neat but i cant figure out the code, i've tried to break it down for almost 2 weeks now, but i cant figure out everything, would sumone please explain what the different values mean?

Thanks,
Jehan


here's an isolated superscope from the setting:

INIT: l=0;k=0;m=20;n=1000;mx=0;my=0;mz=0;dst=2;rx=0;ry=0;rz=0;rdx=0;rdy=0;rdz=1;p=3.14159265;p2=2.0*p;p3=180/p

ONBEAT: ;rdz=if(equal(rdz,1),2,1);

PERFRAME: =0;k=0;rx=rx+rdx;ry=ry+rdy;rz=rz+rdz;xs=sin(rx/p3);ys=sin(ry/p3);zs=sin(rz/p3);xc=cos(rx/p3);yc=cos(ry/p3);zc=cos(rz/p3)

PERPOINT: ;k=if(equal(k,m),0,k+1);
v1=if(equal(k,0),(v),v1);
y1=v1;
x1=2*i-1;z1=1;
y2=y1*xc-z1*xs;z2=y1*xs+z1*xc;x2=z2*ys+x1*yc;z3=z2*yc-x1*ys;x3=x2*zc-y2*zs;y3=y2*zc+x2*zs;x4=mx+x3;y4=my+y3;z4=mz+z3;x=x4/(1+z4/dst);y=y4/(1+z4/dst)


18th April 2002 23:07 UTC

PERFRAME: =0;k=0;rx=rx+rdx
missing variable?

19th April 2002 00:57 UTC

sorry, here's the whole PERFRAME thread, the missing variable is "l"



l=0;k=0;rx=rx+rdx;ry=ry+rdy;rz=rz+rdz;xs=sin(rx/p3);ys=sin(ry/p3);zs=sin(rz/p3);xc=cos(rx/p3);yc=cos(ry/p3);zc=cos(rz/p3)


19th April 2002 01:05 UTC

It's actually easy, you simply take the same value for a series of points, instead of always a different one, like this:

k=if(equal(k,m),0,k+1);
v1=if(equal(k,0),(v),v1);
y1=v1;

This means k will go from 0 to 'm' and back. When k equals 0, a new 'v' is assigned to 'v1'. This is actually the same as k=(k+1)%m; (using the modulus operator, which means 'remainder after division of a by b').

An easier approach is to use getosc and getspec... they allow you to use any value you want.


19th April 2002 21:03 UTC

cool, thanks


24th April 2002 02:05 UTC

Huh?


24th April 2002 02:13 UTC

OK, here's what's going on


nosage:

here's the whole PERFRAME thread, the missing variable is "l"



l=0;k=0;rx=rx+rdx;ry=ry+rdy;rz=rz+rdz;xs=sin(rx/p3);ys=sin(ry/p3);zs=sin(rz/p3);xc=cos(rx/p3);yc=cos(ry/p3);zc=cos(rz/p3)


AND
unconed:
thanks for your help


24th April 2002 12:18 UTC

By the way, try putting up a more descriptive topic the next time. This makes it easier for others when they are searching the forums (a thread titled 'Superscope' could cover anything about the SSC).


24th April 2002 18:18 UTC

ok, sorry