PDA

View Full Version : Spiral


Krash
2nd August 2001, 03:31
These are, to my knowledge, the first presets to use the true equation of a spiral. Rather than using rotation and zoom to draw a spiral, these presets actually define a spiral shaped area, and work with that. Unfortunately, they need to be viewed at a pretty high mesh size, and inaccuracies in the interpolations result in distortion towards the edge of the screen.
Anyway, here they are:

==========
Snail.milk
==========

[preset00]
fRating=3.000000
fGammaAdj=1.210000
fDecay=0.985000
fVideoEchoZoom=2.000000
fVideoEchoAlpha=0.000000
nVideoEchoOrientation=0
nWaveMode=0
bAdditiveWaves=0
bWaveDots=0
bModWaveAlphaByVolume=0
bMaximizeWaveColor=0
bTexWrap=1
bDarkenCenter=0
bMotionVectorsOn=0
bRedBlueStereo=0
nMotionVectorsX=27
nMotionVectorsY=19
bBrighten=0
bDarken=0
bSolarize=0
bInvert=0
fWaveAlpha=7.888676
fWaveScale=3.008607
fWaveSmoothing=0.900000
fWaveParam=-0.600000
fModWaveAlphaStart=1.010000
fModWaveAlphaEnd=0.950000
fWarpAnimSpeed=1.001828
fWarpScale=0.998166
fZoomExponent=1.347713
fShader=0.000000
zoom=0.999900
rot=0.000000
cx=0.500000
cy=0.500000
dx=0.000000
dy=0.000000
warp=1.749001
sx=1.000000
sy=1.000000
wave_r=0.500000
wave_g=0.500000
wave_b=0.500000
wave_x=0.500000
wave_y=0.500000
per_frame_1=wave_r = wave_r + 0.350*( 0.60*sin(0.823*time) + 0.40*sin(0.916*time) );
per_frame_2=wave_g = wave_g + 0.350*( 0.60*sin(0.900*time) + 0.40*sin(1.023*time) );
per_frame_3=wave_b = wave_b + 0.350*( 0.60*sin(0.808*time) + 0.40*sin(0.949*time) );
per_frame_4=warp = 0;
per_frame_5=dx = -0.0005;
per_frame_6=dy = -0.0005;
per_pixel_1=angval = 0.3/sqrt(3.14*tan(ang/2+time/2+bass_att/4)+4);
per_pixel_2=zoom = if( above( rad,0.05 ), if( above( rad/7.8, angval ), if( below( (rad-0.05)/7.8, angval), 1.2, 0.95 ), if( above( rad/2.8, angval ), if( below( (rad-0.05)/2.8, angval), 1.2, 0.95 ), if( above( rad/1, angval ), if( below( (rad-0.05)/1, angval), 1.2, 0.95 ), 0.95 ) ) ), 0.95 );
per_pixel_3=rot = -zoom/5;


====================
Swelling Spiral.milk
====================

[preset00]
fRating=3.000000
fGammaAdj=1.199999
fDecay=0.980000
fVideoEchoZoom=1.216077
fVideoEchoAlpha=0.000000
nVideoEchoOrientation=0
nWaveMode=0
bAdditiveWaves=0
bWaveDots=0
bModWaveAlphaByVolume=0
bMaximizeWaveColor=1
bTexWrap=0
bDarkenCenter=0
bMotionVectorsOn=0
bRedBlueStereo=0
nMotionVectorsX=27
nMotionVectorsY=19
bBrighten=0
bDarken=0
bSolarize=0
bInvert=0
fWaveAlpha=7.888676
fWaveScale=3.323371
fWaveSmoothing=0.900000
fWaveParam=-0.600000
fModWaveAlphaStart=1.010000
fModWaveAlphaEnd=0.950000
fWarpAnimSpeed=1.001828
fWarpScale=0.998166
fZoomExponent=1.347713
fShader=0.000000
zoom=0.999900
rot=0.000000
cx=0.500000
cy=0.500000
dx=0.000000
dy=0.000000
warp=1.749001
sx=1.000000
sy=1.000000
wave_r=0.500000
wave_g=0.500000
wave_b=0.500000
wave_x=0.500000
wave_y=0.500000
per_frame_1=wave_r = wave_r + 0.350*( 0.60*sin(0.823*time) + 0.40*sin(0.916*time) );
per_frame_2=wave_g = wave_g + 0.350*( 0.60*sin(0.900*time) + 0.40*sin(1.023*time) );
per_frame_3=wave_b = wave_b + 0.350*( 0.60*sin(0.808*time) + 0.40*sin(0.949*time) );
per_frame_4=warp = 0;
per_frame_5=dx = -0.0005;
per_frame_6=dy = -0.0005;
per_pixel_1=angval = 0.3/sqrt((3.14*tan(ang-time*3-bass_att*2))+4);
per_pixel_2=zoom = if( above( rad,0.05 ), if( above( rad/7.8, angval ), if( below( (rad-0.05)/7.8, angval), 1.2, 1 ), if( above( rad/2.8, angval ), if( below( (rad-0.05)/2.8, angval), 1.2, 1 ), if( above( rad/1, angval ), if( below( (rad-0.05)/1, angval), 1.2, 1 ), 1 ) ) ), 1 );


Enjoy!

- Krash

Krash
2nd August 2001, 06:58
P.S. - if these seem to run a bit slow, remember that having song title, etc on screen drops the framerate significantly.

Here's another:

=================
Swelling Spiral 2
=================

[preset00]
fRating=3.000000
fGammaAdj=1.199999
fDecay=0.980000
fVideoEchoZoom=0.996629
fVideoEchoAlpha=0.499900
nVideoEchoOrientation=0
nWaveMode=7
bAdditiveWaves=0
bWaveDots=0
bModWaveAlphaByVolume=0
bMaximizeWaveColor=1
bTexWrap=0
bDarkenCenter=0
bMotionVectorsOn=0
bRedBlueStereo=0
nMotionVectorsX=27
nMotionVectorsY=19
bBrighten=0
bDarken=0
bSolarize=0
bInvert=0
fWaveAlpha=7.888676
fWaveScale=1.228687
fWaveSmoothing=0.720000
fWaveParam=0.000000
fModWaveAlphaStart=1.010000
fModWaveAlphaEnd=0.950000
fWarpAnimSpeed=1.001828
fWarpScale=0.998166
fZoomExponent=1.347713
fShader=0.000000
zoom=0.999900
rot=0.020000
cx=0.500000
cy=0.500000
dx=0.000000
dy=0.000000
warp=1.749001
sx=1.000000
sy=1.000000
wave_r=0.500000
wave_g=0.500000
wave_b=0.500000
wave_x=0.500000
wave_y=0.500000
per_frame_1=wave_r = wave_r + 0.350*( 0.60*sin(0.823*time) + 0.40*sin(0.916*time) );
per_frame_2=wave_g = wave_g + 0.350*( 0.60*sin(0.900*time) + 0.40*sin(1.023*time) );
per_frame_3=wave_b = wave_b + 0.350*( 0.60*sin(0.808*time) + 0.40*sin(0.949*time) );
per_frame_4=warp = 0;
per_frame_5=dx = -0.0005;
per_frame_6=dy = -0.0005;
per_frame_7=wave_mystery = wave_mystery - 0.5*time;
per_pixel_1=angval = 0.3/sqrt((3.14*tan(ang-time*3))+4);
per_pixel_2=zoom = if( above( rad,0.05 ), if( above( rad/7.8, angval ), if( below( (rad-0.05)/7.8, angval), 1.2, 1 ), if( above( rad/2.8, angval ), if( below( (rad-0.05)/2.8, angval), 1.2, 1 ), if( above( rad/1, angval ), if( below( (rad-0.05)/1, angval), 1.2, 1 ), 1 ) ) ), 1 );


- Krash

Krash
3rd August 2001, 05:45
I'm getting alot of different effects playing around with this. Here are some more:

==============
Corkscrew.milk
==============

[preset00]
fRating=3.000000
fGammaAdj=1.199999
fDecay=0.980000
fVideoEchoZoom=1.216077
fVideoEchoAlpha=0.000000
nVideoEchoOrientation=0
nWaveMode=5
bAdditiveWaves=0
bWaveDots=0
bModWaveAlphaByVolume=0
bMaximizeWaveColor=1
bTexWrap=0
bDarkenCenter=1
bMotionVectorsOn=0
bRedBlueStereo=0
nMotionVectorsX=27
nMotionVectorsY=19
bBrighten=0
bDarken=0
bSolarize=0
bInvert=0
fWaveAlpha=7.888676
fWaveScale=1.829349
fWaveSmoothing=0.900000
fWaveParam=-0.600000
fModWaveAlphaStart=1.010000
fModWaveAlphaEnd=0.950000
fWarpAnimSpeed=1.001828
fWarpScale=0.998166
fZoomExponent=1.347713
fShader=0.000000
zoom=0.999900
rot=0.000000
cx=0.500000
cy=0.500000
dx=0.000000
dy=0.000000
warp=1.749001
sx=1.000000
sy=1.000000
wave_r=0.500000
wave_g=0.500000
wave_b=0.500000
wave_x=0.500000
wave_y=0.500000
per_frame_1=wave_r = wave_r + 0.350*( 0.60*sin(0.823*time) + 0.40*sin(0.916*time) );
per_frame_2=wave_g = wave_g + 0.350*( 0.60*sin(0.900*time) + 0.40*sin(1.023*time) );
per_frame_3=wave_b = wave_b + 0.350*( 0.60*sin(0.808*time) + 0.40*sin(0.949*time) );
per_frame_4=warp = 0;
per_frame_5=dx = -0.0005;
per_frame_6=dy = -0.0005;
per_pixel_1=angval = 0.3/sqrt((3.14*tan(ang*2.5-time*5))+4);
per_pixel_2=zoom = if( above( rad,0.05 ), if( above( rad/7.8, angval ), if( below( (rad-0.05)/7.8, angval), 1, 1.1 ), if( above( rad/2.8, angval ), if( below( (rad-0.05)/2.8, angval), 1, 1.1 ), if( above( rad/1, angval ), if( below( (rad-0.05)/1, angval), 1, 1.1 ), 1.1 ) ) ), 1.1 );
per_pixel_3=rot = 0.02*zoom-0.05*rad;


===============
Hyperspace.milk
===============

[preset00]
fRating=3.000000
fGammaAdj=1.199900
fDecay=0.990000
fVideoEchoZoom=2.977717
fVideoEchoAlpha=0.000000
nVideoEchoOrientation=3
nWaveMode=2
bAdditiveWaves=1
bWaveDots=1
bModWaveAlphaByVolume=1
bMaximizeWaveColor=1
bTexWrap=0
bDarkenCenter=1
bMotionVectorsOn=0
bRedBlueStereo=0
nMotionVectorsX=27
nMotionVectorsY=19
bBrighten=0
bDarken=0
bSolarize=0
bInvert=0
fWaveAlpha=7.888676
fWaveScale=22.010435
fWaveSmoothing=0.900000
fWaveParam=-0.280000
fModWaveAlphaStart=0.650000
fModWaveAlphaEnd=0.950000
fWarpAnimSpeed=1.001828
fWarpScale=0.998166
fZoomExponent=1.347710
fShader=0.000000
zoom=0.999900
rot=0.000000
cx=0.500000
cy=0.500000
dx=0.000000
dy=0.000000
warp=1.749001
sx=1.000000
sy=1.000000
wave_r=0.500000
wave_g=0.500000
wave_b=0.500000
wave_x=0.500000
wave_y=0.500000
per_frame_1=wave_r = wave_r + 0.350*( 0.60*sin(0.823*time) + 0.40*sin(0.916*time) );
per_frame_2=wave_g = wave_g + 0.350*( 0.60*sin(0.900*time) + 0.40*sin(1.023*time) );
per_frame_3=wave_b = wave_b + 0.350*( 0.60*sin(0.808*time) + 0.40*sin(0.949*time) );
per_frame_4=warp = 0;
per_frame_5=dx = -0.0005;
per_frame_6=dy = -0.0005;
per_pixel_1=angval = 0.3/sqrt((1*tan(ang*time-time*10))+4);
per_pixel_2=zoom = if( above( rad,0.05 ), if( above( rad/7.8, angval ), if( below( (rad-0.05)/7.8, angval), 0.9, 1.1 ), if( above( rad/2.8, angval ), if( below( (rad-0.05)/2.8, angval), 0.9, 1.1 ), if( above( rad/1, angval ), if( below( (rad-0.05)/1, angval), 0.9, 1.1 ), 1.1 ) ) ), 1.1 );


Let me know what you think!

- Krash

Zylot
4th August 2001, 04:54
I gotta tranfer these to my Milkdrop runnin' comp.. the slow and painful way, tomorrow I'll have plenty of free time and check these out.

bmelgren
6th August 2001, 17:50
Didn't know wave_mystery was usable in the per frame. Will have to play with your new per pixel stuff too. Thanks!

Krash
7th August 2001, 05:53
If you're going to edit the per_pixel stuff, there's a couple values you shouldn't mess with.

In the big long per pixel equation (with the if statements), all the if statements have a rad/XXX part in there. Don't change that fraction, and specifically the denominator.

The actual spiral equation only works for one loop (since we're only working with ang values between -pi and pi), and so those fractions replicate the spiral further out from the center. If you change the numbers, the spiral won't line up, and it'll look bad.

Changing the angval equation will give you most of the effects, and changing the ACTUAL VALUES in the big long one (the 1's and 1.1's in corkscrew.. different for the others). These can give you some different effects, without stuffing up the spiral function.

- Krash

[Edited by Krash on 08-07-2001 at 02:09 AM]