Winamp & Shoutcast Forums > AVS A curiosity

 3rd May 2005, 11:41 #1 PAK-9 Major Dude     Join Date: Oct 2002 Location: The United Kingdom of Great Britain and Northern Ireland Posts: 1,374 A curiosity If you make a superscope to render a circle of radius n, then you place a movement after it with the code d=n, shouldn't it produce a fullscreen circular gradient the colour of your superscope? I can tell you that it doesn't, but it seems to me that logically it should. You are saying for every pixel the r value remains the same but the d is a constant. Any thoughts? If you want to try it make a ssc x=sin(i*\$pi*2)*n; y=cos(i*\$pi*2)*n; red,green,blue = whatever; movement: d=n; except replace the n with a scale factor 1>n>0 (what it is shouldnt make a difference) http://PAK-9.deviantart.com ...innit
 3rd May 2005, 16:59 #2 ^..^ Major Dude     Join Date: Sep 2004 Location: There Posts: 1,002 shouldn't this thread be in "troubleshooting"? However, i know what you mean. Logically it really should work. I guess the problem is that ssc and movement use slightly different coordinates for the pixels (probably rounding errors). If you have a radius of 0.5 for example, you can tweak the movment to d=0.49/d=0.505 etc. If you do so you'll see that sometimes there is a gradient made of a few points and sometimes there isn't anything. If you want to get this idea to work, you'd have to assign a slightly different value to d, depending on the segment of the circle. (and this crappy work-around will probably only work for one specific resolution...)
 3rd May 2005, 17:21 #3 roboBOT Junior Member     Join Date: Sep 2004 Location: Look out behind you! Posts: 20 It's because of aspect-ratio stuff. You have to correct for the aspect ratio, and it helps to use a fairly thick line. I got it to work once a long time ago.
 3rd May 2005, 22:10 #4 roboBOT Junior Member     Join Date: Sep 2004 Location: Look out behind you! Posts: 20 movement code: (use rectangular coordinates) r=atan2(y,x) x=n*cos(r);y=n*sin(r)
 4th May 2005, 01:44 #5 fsk Senior Member     Join Date: Aug 2002 Location: right around the corner Posts: 223 tomy had the same problem when he was makeing plasma containment. the important clue is that movements aspect ratio works so that d==1 in the corners. I wrote the code to sinc the ssc with it but it seems i lost it. And i cant remember how i did it from my head. it is in the plasma containment preset though (optimised by tomy). I hate signatures!! *bangs his head on the keyboard in hope of getting an idea* Ufihreevf43n98pevfr
 4th May 2005, 02:07 #6 TomyLobo Major Dude     Join Date: Feb 2004 Location: Germany Posts: 580 polar movement is aspect-ratio corrected by default, while SSC is not just use a simple linear SSC gradient SSC: ```code: frame: n=w; point: x=2*assign(red,assign(green,assign(blue,i)))-1; y=0; ``` movement(rectangular): ```code: y=0; x=r/\$pi-1; x=if(below(x,-1),x+2,x) ``` If you can't say something nice, say something surrealistic.
 5th May 2005, 09:39 #7 PAK-9 Major Dude     Join Date: Oct 2002 Location: The United Kingdom of Great Britain and Northern Ireland Posts: 1,374 er... okay I think a lot of people are missing the point, this isnt a problem I'm having that I need to solve, its a question of the way movements work. I appreciate the aspect ration correction idea, it never really occured to me before but of course movements with polar coords aspect ratio correct by default. I'll have to try it out with an aspect ratio corrected superscope. http://PAK-9.deviantart.com ...innit
 10th May 2005, 01:45 #8 TomyLobo Major Dude     Join Date: Feb 2004 Location: Germany Posts: 580 the aspect ratio correction is rather fishy... better skip that and leave it alone If you can't say something nice, say something surrealistic.
 11th May 2005, 07:34 #9 jheriko Forum King     Join Date: Aug 2002 Location: a twist in the fabric of space Posts: 2,150 the aspect ratio correction is a bit odd, like fsk said d==1 in the corners, so that if you do a one point ssc at x=0,y=0 and movement like d=if(above(d,1),0,d); you get a black screen with a dot in the middle. The fix is pretty trivial, its just aspect correct as normal then scale everything by sqrt 2. I'm guessing this is what movement does internally, unless there are some ultra r33t voodoo hax in use... -- Jheriko 'Everything around us can be represented and understood through numbers'
 Winamp & Shoutcast Forums > AVS A curiosity