(no subject)
Mar. 13th, 2004 12:51 pmFactors
Joining direction
The first factor considered was what constituted an ‘adjacent’ cell. Either the partical only attaches to occupied cells on the cardinal points, or it can attach to all 8 cells around it.
This is a relatively easy piece of coding to implement, requiring a new button, to change the value of join between 0 and 1, thus selecting one of the two joining styles, and the current detection code to be replaced with the section below:
If joining style =1
if (join ==1)
{
check if any of eight nearest neighbours are occupied, if so return “a”, the flag to attach the moving partical
if (grid[x+1+N/2][y+N/2]+
grid[x-1+N/2][y+N/2]+
grid[x+N/2][y+1+N/2]+
grid[x+N/2][y-1+N/2]+
grid[x+1+N/2][y+1+N/2]+
grid[x-1+N/2][y+1+N/2]+
grid[x-1+N/2][y-1+N/2]+
grid[x+1+N/2][y-1+N/2] >0)return 'a';
}
If joining style =10
if (join ==0)
check if any of the neighbours at cardinal points are occupied, if so return “a”, the flag to attach the moving particle
{
if(grid[x+1+N/2][y+N/2]+ /* check if square nearest neighbours occupied */
grid[x-1+N/2][y+N/2]+
grid[x+N/2][y+1+N/2]+
grid[x+N/2][y-1+N/2] >0)return 'a';
}
By setting the joining style to the two different possibilities, and running the programme, it is hoped that it will be possible to obtain characteristic dimension for the two different set ups, thus it should be possible to look at the density of two different aggregates and determine something of the algorithm that lead to them.
By loading the data produced by the program into excel it is possible to perform a full regression analysis on the data.
This not only gives the dimension of the aggregate, but gives a standard error, which is a measure of how accurately a trend line with a coefficient of the dimension would fit to the points.
Joining direction
The first factor considered was what constituted an ‘adjacent’ cell. Either the partical only attaches to occupied cells on the cardinal points, or it can attach to all 8 cells around it.
This is a relatively easy piece of coding to implement, requiring a new button, to change the value of join between 0 and 1, thus selecting one of the two joining styles, and the current detection code to be replaced with the section below:
If joining style =1
if (join ==1)
{
check if any of eight nearest neighbours are occupied, if so return “a”, the flag to attach the moving partical
if (grid[x+1+N/2][y+N/2]+
grid[x-1+N/2][y+N/2]+
grid[x+N/2][y+1+N/2]+
grid[x+N/2][y-1+N/2]+
grid[x+1+N/2][y+1+N/2]+
grid[x-1+N/2][y+1+N/2]+
grid[x-1+N/2][y-1+N/2]+
grid[x+1+N/2][y-1+N/2] >0)return 'a';
}
If joining style =10
if (join ==0)
check if any of the neighbours at cardinal points are occupied, if so return “a”, the flag to attach the moving particle
{
if(grid[x+1+N/2][y+N/2]+ /* check if square nearest neighbours occupied */
grid[x-1+N/2][y+N/2]+
grid[x+N/2][y+1+N/2]+
grid[x+N/2][y-1+N/2] >0)return 'a';
}
By setting the joining style to the two different possibilities, and running the programme, it is hoped that it will be possible to obtain characteristic dimension for the two different set ups, thus it should be possible to look at the density of two different aggregates and determine something of the algorithm that lead to them.
By loading the data produced by the program into excel it is possible to perform a full regression analysis on the data.
This not only gives the dimension of the aggregate, but gives a standard error, which is a measure of how accurately a trend line with a coefficient of the dimension would fit to the points.