|
|
|
|
#1 |
|
Junior Member
Join Date: Aug 2003
Location: The Netherlands
Posts: 47
|
Cyclic Array
A little experiment with a cyclic array.
|
|
|
|
|
|
#2 |
|
Banned
|
There is black window, without any motion & color.
|
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Aug 2003
Location: The Netherlands
Posts: 47
|
You'll need Avs 2.81b
|
|
|
|
|
|
#4 |
|
Major Dude
Join Date: Feb 2004
Location: Germany
Posts: 580
|
you could optimize the whole thing a lot by using a cyclic buffer. that is, if you had 5 buffer entries you now do this
copy 3 to 4 copy 2 to 3 copy 1 to 2 copy 0 to 1 put new data into 0 use 0, 1, 2, 3, 4 using a cyclic buffer means you do the following: bufnum=5 bufbase=(bufbase+1)%bufnum use (bufbase+0)%bufnum, (bufbase+1)%bufnum, (bufbase+2)%bufnum, (bufbase+3)%bufnum, (bufbase+4)%bufnum understood? ![]() you save the copying time and shift the base index by +1 (the % is the modulo operation, which does a division and returns the rest If you can't say something nice, say something surrealistic. |
|
|
|
|
|
#5 | |
|
Junior Member
Join Date: Aug 2003
Location: The Netherlands
Posts: 47
|
Quote:
Just look at the (simplified) code; per frame: ww=80; points per ring hh=100; amount of rings fc=(fc+1)%hh; offset, your bufbase loop(ww,exec2(assign( gmegabuf(cc+ww*fc), (getosc((cc/ww),.1,0))) ,assign(cc,cc+1))); assign getosc data for each point on the ring. per point: z1=gmegabuf((pc+fc*ww+ww)%n); retreive array data and counter the offset. pc=pc+1; pointcounter |
|
|
|
|
|
|
#6 |
|
Major Dude
Join Date: Feb 2004
Location: Germany
Posts: 580
|
oops i must have overread that, sorry
If you can't say something nice, say something surrealistic. |
|
|
|
|
|
#7 |
|
Senior Member
Join Date: May 2003
Posts: 101
|
/me demands interactive 3d rotation "drag'n'drop" style :P
nice curves!
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|