Okay, here are two pieces of code, that
should be visually identical, but are actually very different. The first uses 't' to determine the rotation rate. Changing the target FPS has NO EFFECT.
Code: Select all
Aspc=1
ConB=1
Num=1
Coil=10
A0=".55" // 1 or LESS
A1="A0 * { sin(Coil*2*Pi*s)
, cos(Coil*2*Pi*s)
}"
B0=""
B1="t"
B2=""
B3="", B4="", B5="", B6="", B7=""
B8="B1"
B9="sin(Pi/6)" // z
B10="(2*s-1)"
B11=""
B12="A1 * sqrt(1-B10^2)"
B13="A0 * B10"
C0="cos( B8 ) * row(B12,0) + sin( B8 ) * B13" // x'
C1="cos( B8 ) * B13 - sin( B8 ) * row(B12,0)" // y'
C2="cos( B9 ) * row(B12,1) + sin( B9 ) * C1" // z'
X0=" C0"
Y0=" C2"
Meta="reactive=3 detail=3 density=3 morphable=5"
Vers=500
This second piece of code, uses the delta time required to create the [last]frame, and sums the time increments. If I didn't screw anything up, changing the target frame rate, shouldn't have any effect. So now the question you are left with, is WHY would I bother to go through this extra level of complexity, when the first, more forward, piece of code would suffice???
okay, I screwed up and got a little ahead of my self... so I modified the code a bit to confirm what (was suppose to be) going on...
Code: Select all
Aspc=1
ConB=1
Num=2
Coil=10
A0=".45" // 1 or LESS
A1="A0 * { sin(Coil*2*Pi*s)
, cos(Coil*2*Pi*s)
}"
B0="t-B1"
B1="t"
B2="select(Id, B2, B2 + B0)" // Weight Factor (33*B0)
B3="", B4="", B5="", B6="", B7=""
B8="select(Id, t, B2)"
B9="sin(Pi/6)" // z
B10="(2*s-1)" // Could certainly be Avar
B11=""
B12="A1 * sqrt(1-B10^2)" // Could certainly be Avar
B13="A0 * B10" // Could certainly be Avar
C0="cos( B8 ) * row(B12,0) + sin( B8 ) * B13" // x'
C1="cos( B8 ) * B13 - sin( B8 ) * row(B12,0)" // y'
C2="cos( B9 ) * row(B12,1) + sin( B9 ) * C1" // z'
X0=" C0 + select(Id, .5, -.5)"
Y0=" C2"
Meta="reactive=3 detail=3 density=3 morphable=5"
Vers=500
First lesson you
should learn... Challenge everything I post...
Well no guarantee this was worth the wait, but I did check my code this time
(maybe), and you need to keep your eyes on the left ball. Standalone is the best test platform. You should vary the music genres selections, including silence). It probably could use to be tuned up a bit...
Code: Select all
Aspc=1
ConB=1
Num=2
Coil=10
rate=2.5
A0=".45" // 1 or LESS
A1="A0 * { sin(Coil*2*Pi*s)
, cos(Coil*2*Pi*s)
}"
B0="select(Id, B0, (t-B1))" // Weight Factor (33*B0)
B1="t"
B2="select(Id, B2, (Bass + B2*(40-1))/40 )"
B3="select(Id, B3, B3 + (rate*B0*B2))" // rotation rate
B4="select(Id, B4, B3)"
B5="", B6="", B7=""
B8="select(Id, t, B4)"
B9="sin(Pi/6)" // z
B10="(2*s-1)" // Could certainly be Avar
B11=""
B12="A1 * sqrt(1-B10^2)" // Could certainly be Avar
B13="A0 * B10" // Could certainly be Avar
C0="cos( B8 ) * row(B12,0) + sin( B8 ) * B13" // x'
C1="cos( B8 ) * B13 - sin( B8 ) * row(B12,0)" // y'
C2="cos( B9 ) * row(B12,1) + sin( B9 ) * C1" // z'
X0=" C0 + select(Id, .5, -.5)"
Y0=" C2"
Meta="reactive=3 detail=3 density=3 morphable=5"
Vers=500
This should keep you busy
... NOT perfect, but not bad. Each sphere is reacting to a fft() frequency band. Turning off Flowfields may be in order.
(Updated 12/21/13 -2)Code: Select all
Aspc=1
ConB=1
Num=4
A0=".325- .024*(Num-4)" // Static Scale
Coil=10
Stps=768
A1="{ choice({0,1}/4)
, choice(vectorLR(Num, 0, Num-1))
} * 0" // *** Disabled ***/
A2="A0 * { sin(Coil*2*Pi*s)
, cos(Coil*2*Pi*s)
}"
B0="select(Id, B0, max((t-B1), 1/66))"
B1="t" // (33*B0)
Wght=1.6 // 1.6
RSpd=3.7 // Rotation Velocity
Plse=.9 // Pulse Amplitude
Idle=.05
A3="transpose({ (48/33)
, (24/33)
} )" // [Rows] Damping (Weight) Factors {Speed, Size}
A4="{ vectorLR(Num, .15, .6)
, vector(Num, 1)
}"
B2="((33*Wght)*B0) * fft(t*col(A1,0) + row(A4,0))"
B3="select(Id, B3, A3/B0 )"
B4="select(Id, B4, (B2 + B4*(B3-1))/B3 )"
B5="select(Id, B5, B5 + B0*max(Idle, (RSpd*sin(atan(row(B4,0))))))" // rotation rate
B6="select(Id, B6, (1+atan(row(B4,1)/Plse)))" // Pulse
A5="(2*s-1)"
A6="A2 * sqrt(1-A5^2)"
A7="A0 * A5"
B7="(col(A1,1) + Id) % Num"
B8=" col(B5, B7)"
C0="cos( B8 ) * row(A6,0) + sin( B8 ) * A7" // x'
C1="cos( B8 ) * A7 - sin( B8 ) * row(A6,0)" // y'
B9="sin(t/6)" // z Pi/6
C2="cos( B9 ) * row(A6,1) + sin( B9 ) * C1" // z'
B10="col(B6, B7)"
A8="((.5+ .05*(Num-4))*{-1, 1})"
B11="map1D(X_Extents*A8, (Id%(Num/2))/((Num/2)-1), 1)"
B12="select(Id<(Num/2), -.5, .5)"
X0=" B10 * C0 + B11"
Y0=" B10 * C2 + B12"
Lwdt="1.1"
Meta="reactive=3 detail=3 density=3 morphable=5"
Vers=500