You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

waves-3.cfdg 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. startshape GRID (1000,1000)[] //( 640, 640 ) []
  2. CF::Time = [time 0 1]
  3. CF::Background = [ b -1 ]
  4. CF::MinimumSize = 0.0001
  5. sine(t,amp,freq,phase) = amp*sin( 360 * (freq*t + phase) )
  6. dist ( n, o ) = abs ( n - o )
  7. inv2 ( n ) = 1/n^2
  8. para ( n, o, p ) = n^2*o+p
  9. st0 = sine ( ftime(), 1, 3, 0.2 )
  10. st1 = sine ( ftime(), 1, 3, 0.5 )
  11. st2 = sine ( ftime(), 1, 2, 0.9 )
  12. shape GRID ( natural n, natural o )
  13. {
  14. loop i=n []
  15. {
  16. si0 = sine ( i/n, 1, 1, 0 )
  17. si1 = sine ( i/n, 1, 2, 0.2 )
  18. si2 = sine ( i/n, 1, 3, 0.7 )
  19. s0 = sine ( (1/n)*i, o/3*si0, 3, ftime() )+st0
  20. s1 = sine ( (1/n)*i, o/3*si1, 2, ftime() )+st1
  21. s2 = sine ( (1/n)*i, o/3*si2, 1, ftime() )+st2
  22. X = i-(n/2)
  23. loop j=o []
  24. {
  25. Y = j-(o/2)
  26. BC = 0.02
  27. BN = 2/3
  28. BM = 1.4
  29. B0 = BN/para ( BC, dist ( Y, s0 )^2, BM )
  30. B1 = BN/para ( BC, dist ( Y, s1 )^2, BM )
  31. B2 = BN/para ( BC, dist ( Y, s2 )^2, BM )
  32. B = B0+B1+B2
  33. S = 1.2-(B0+B1+B2)
  34. H = st0*st1*st2*si0+190
  35. SQUARE [ x X y Y b B sat S hue H]
  36. }
  37. }
  38. }