Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 56d8007d46 | |||
| 9f34807269 | |||
| 7d37960439 | |||
| 6afaf0c82d | |||
| 345da9aa86 | |||
| 39231f0d92 | |||
| 5f0f5c3820 | |||
| f7bfd64616 | |||
| 820323b53d | |||
| 7041c6d485 | |||
| 3f6a8f0282 | |||
| c33a2a207f | |||
| e47864752a | |||
| f323248610 | |||
| 54d02253ef | |||
| dacfff3e96 | |||
| c1b4b6bab1 | |||
| 863fd61d28 | |||
| d69402e32e | |||
| 952e31449f | |||
| 4e497b8438 | |||
| ef89b285d1 |
3
.gitignore
vendored
3
.gitignore
vendored
@ -110,3 +110,6 @@ fabric.properties
|
|||||||
|
|
||||||
# Android studio 3.1+ serialized cache file
|
# Android studio 3.1+ serialized cache file
|
||||||
.idea/caches/build_file_checksums.ser
|
.idea/caches/build_file_checksums.ser
|
||||||
|
|
||||||
|
/run
|
||||||
|
*.jl
|
||||||
|
|||||||
217
DLASystem.cpp
217
DLASystem.cpp
@ -4,96 +4,43 @@
|
|||||||
|
|
||||||
#include "DLASystem.h"
|
#include "DLASystem.h"
|
||||||
|
|
||||||
#include <utility>
|
using std::cout;
|
||||||
|
using std::endl;
|
||||||
|
|
||||||
// this function gets called every step,
|
// this function gets called every step,
|
||||||
// if there is an active particle then it gets moved,
|
// if there is an active particle then it gets moved,
|
||||||
// if not then add a particle
|
// if not then add a particle
|
||||||
bool DLASystem::Update() {
|
void DLASystem::update() {
|
||||||
|
this->frame++;
|
||||||
|
|
||||||
if (lastParticleIsActive == 1) {
|
if (lastParticleIsActive == 1) {
|
||||||
moveLastParticle();
|
moveLastParticle();
|
||||||
} else if (numParticles < endNum) {
|
} else if (this->particleList.size() < (size_t) endNum) {
|
||||||
addParticleOnAddCircle();
|
addParticleOnAddCircle();
|
||||||
setParticleActive();
|
setParticleActive();
|
||||||
} else {
|
} else {
|
||||||
return false;
|
this->running = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void DLASystem::clearParticles() {
|
|
||||||
// delete particles and the particle list
|
|
||||||
for (int i = 0; i < numParticles; i++) {
|
|
||||||
delete particleList[i];
|
|
||||||
}
|
|
||||||
particleList.clear();
|
|
||||||
numParticles = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// remove any existing particles and setup initial condition
|
|
||||||
void DLASystem::Reset() {
|
|
||||||
// stop running
|
|
||||||
running = 0;
|
|
||||||
|
|
||||||
clearParticles();
|
|
||||||
|
|
||||||
lastParticleIsActive = 0;
|
|
||||||
|
|
||||||
// set the grid to zero
|
|
||||||
for (int i = 0; i < gridSize; i++) {
|
|
||||||
for (int j = 0; j < gridSize; j++) {
|
|
||||||
grid[i][j] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// setup initial condition and parameters
|
|
||||||
addCircle = 10;
|
|
||||||
killCircle = 2.0 * addCircle;
|
|
||||||
clusterRadius = 0.0;
|
|
||||||
// add a single particle at the origin
|
|
||||||
double pos[] = {0.0, 0.0};
|
|
||||||
addParticle(pos);
|
|
||||||
|
|
||||||
// set the view
|
|
||||||
int InitialViewSize = 40;
|
|
||||||
setViewSize(InitialViewSize);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// set the value of a grid cell for a particular position
|
// set the value of a grid cell for a particular position
|
||||||
// note the position has the initial particle at (0,0)
|
// note the position has the initial particle at (0,0)
|
||||||
// but this corresponds to the middle of the grid array ie grid[ halfGrid ][ halfGrid ]
|
// but this corresponds to the middle of the grid array ie grid[ halfGrid ][ halfGrid ]
|
||||||
void DLASystem::setGrid(double pos[], int val) {
|
void DLASystem::setGrid(std::array<double, 2> pos, int val) {
|
||||||
int halfGrid = gridSize / 2;
|
*index_grid(pos) = val;
|
||||||
grid[(int) (pos[0] + halfGrid)][(int) (pos[1] + halfGrid)] = val;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// read the grid cell for a given position
|
// read the grid cell for a given position
|
||||||
int DLASystem::readGrid(double pos[]) {
|
int DLASystem::readGrid(std::array<double, 2> pos) {
|
||||||
int halfGrid = gridSize / 2;
|
return *index_grid(pos);
|
||||||
return grid[(int) (pos[0] + halfGrid)][(int) (pos[1] + halfGrid)];
|
|
||||||
}
|
|
||||||
|
|
||||||
// check if the cluster is big enough and we should stop:
|
|
||||||
// to be safe, we need the killCircle to be at least 2 less than the edge of the grid
|
|
||||||
int DLASystem::checkStop() {
|
|
||||||
if (killCircle + 2 >= gridSize / 2) {
|
|
||||||
pauseRunning();
|
|
||||||
cout << "STOP" << endl;
|
|
||||||
// glutPostRedisplay(); // update display
|
|
||||||
return 1;
|
|
||||||
} else return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// add a particle to the system at a specific position
|
// add a particle to the system at a specific position
|
||||||
void DLASystem::addParticle(double pos[]) {
|
void DLASystem::addParticle(std::array<double, 2> pos) {
|
||||||
// create a new particle
|
// create a new particle
|
||||||
Particle *p = new Particle(pos);
|
auto *p = new Particle(pos);
|
||||||
// push_back means "add this to the end of the list"
|
// push_back means "add this to the end of the list"
|
||||||
particleList.push_back(p);
|
particleList.push_back(p);
|
||||||
numParticles++;
|
|
||||||
|
|
||||||
// pos coordinates should be -gridSize/2 < x < gridSize/2
|
// pos coordinates should be -gridSize/2 < x < gridSize/2
|
||||||
setGrid(pos, 1);
|
setGrid(pos, 1);
|
||||||
@ -103,20 +50,19 @@ void DLASystem::addParticle(double pos[]) {
|
|||||||
// if we hit an occupied site then we do nothing except print a message
|
// if we hit an occupied site then we do nothing except print a message
|
||||||
// (this should never happen)
|
// (this should never happen)
|
||||||
void DLASystem::addParticleOnAddCircle() {
|
void DLASystem::addParticleOnAddCircle() {
|
||||||
double pos[2];
|
|
||||||
double theta = rgen.random01() * 2 * M_PI;
|
double theta = rgen.random01() * 2 * M_PI;
|
||||||
pos[0] = ceil(addCircle * cos(theta));
|
std::array<double, 2> pos{ceil(addCircle * cos(theta)), ceil(addCircle * sin(theta))};
|
||||||
pos[1] = ceil(addCircle * sin(theta));
|
if (readGrid(pos) == 0) {
|
||||||
if (readGrid(pos) == 0)
|
|
||||||
addParticle(pos);
|
addParticle(pos);
|
||||||
else
|
} else {
|
||||||
cout << "FAIL " << pos[0] << " " << pos[1] << endl;
|
cout << "FAIL " << pos[0] << " " << pos[1] << endl;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// send back the position of a neighbour of a given grid cell
|
// send back the position of a neighbour of a given grid cell
|
||||||
// NOTE: there is no check that the neighbour is inside the grid,
|
// NOTE: there is no check that the neighbour is inside the grid,
|
||||||
// this has to be done separately...
|
// this has to be done separately...
|
||||||
void DLASystem::setPosNeighbour(double setpos[], double pos[], int val) {
|
void DLASystem::setPosNeighbour(std::array<double, 2> &setpos, const std::array<double, 2> pos, int val) {
|
||||||
switch (val) {
|
switch (val) {
|
||||||
case 0:
|
case 0:
|
||||||
setpos[0] = pos[0] + 1.0;
|
setpos[0] = pos[0] + 1.0;
|
||||||
@ -137,95 +83,68 @@ void DLASystem::setPosNeighbour(double setpos[], double pos[], int val) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if the view is smaller than the kill circle then increase the view area (zoom out)
|
|
||||||
void DLASystem::updateViewSize() {
|
|
||||||
double mult = 1.2;
|
|
||||||
if (viewSize < 2.0 * killCircle) {
|
|
||||||
setViewSize(viewSize * mult);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// set the view to be the size of the add circle (ie zoom in on the cluster)
|
|
||||||
void DLASystem::viewAddCircle() {
|
|
||||||
setViewSize(2.0 * addCircle); // factor of 2 is to go from radius to diameter
|
|
||||||
}
|
|
||||||
|
|
||||||
// when we add a particle to the cluster, we should update the cluster radius
|
// when we add a particle to the cluster, we should update the cluster radius
|
||||||
// and the sizes of the addCircle and the killCircle
|
// and the sizes of the addCircle and the killCircle
|
||||||
void DLASystem::updateClusterRadius(double pos[]) {
|
void DLASystem::updateClusterRadius(std::array<double, 2> pos) {
|
||||||
|
double newRadius = distanceFromOrigin(pos);
|
||||||
double rr = distanceFromOrigin(pos);
|
if (newRadius > clusterRadius) {
|
||||||
if (rr > clusterRadius) {
|
clusterRadius = newRadius;
|
||||||
clusterRadius = rr;
|
|
||||||
// this is how big addCircle is supposed to be:
|
// this is how big addCircle is supposed to be:
|
||||||
// either 20% more than cluster radius, or at least 5 bigger.
|
// either 20% more than cluster radius, or at least 5 bigger.
|
||||||
double check = clusterRadius * addRatio;
|
double check = clusterRadius * addRatio;
|
||||||
if (check < clusterRadius + 5)
|
if (check < clusterRadius + 5) {
|
||||||
check = clusterRadius + 5;
|
check = clusterRadius + 5;
|
||||||
|
}
|
||||||
|
|
||||||
// if it is smaller then update everything...
|
// if it is smaller then update everything...
|
||||||
if (addCircle < check) {
|
if (addCircle < check) {
|
||||||
addCircle = check;
|
addCircle = check;
|
||||||
killCircle = killRatio * addCircle;
|
killCircle = killRatio * addCircle;
|
||||||
updateViewSize();
|
|
||||||
}
|
}
|
||||||
checkStop();
|
|
||||||
|
if (killCircle + 2 >= gridSize / 2) {
|
||||||
|
std::cerr << "Early Exit" << endl;
|
||||||
|
this->running = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// make a random move of the last particle in the particleList
|
// make a random move of the last particle in the particleList
|
||||||
void DLASystem::moveLastParticle() {
|
void DLASystem::moveLastParticle() {
|
||||||
int rr = rgen.randomInt(4); // pick a random number in the range 0-3, which direction do we hop?
|
int direction = rgen.randomInt(4); // pick a random number in the range 0-3, which direction do we hop?
|
||||||
double newpos[2];
|
std::array<double, 2> newpos{};
|
||||||
|
|
||||||
Particle *lastP = particleList[numParticles - 1];
|
Particle *lastP = particleList[this->particleList.size() - 1];
|
||||||
|
|
||||||
setPosNeighbour(newpos, lastP->pos, rr);
|
setPosNeighbour(newpos, lastP->pos, direction);
|
||||||
|
|
||||||
if (distanceFromOrigin(newpos) > killCircle) {
|
if (distanceFromOrigin(newpos) > killCircle) {
|
||||||
//cout << "#deleting particle" << endl;
|
|
||||||
setGrid(lastP->pos, 0);
|
setGrid(lastP->pos, 0);
|
||||||
particleList.pop_back(); // remove particle from particleList
|
particleList.pop_back(); // remove particle from particleList
|
||||||
numParticles--;
|
|
||||||
setParticleInactive();
|
setParticleInactive();
|
||||||
}
|
} else if (readGrid(newpos) == 0) {
|
||||||
// check if destination is empty
|
|
||||||
else if (readGrid(newpos) == 0) {
|
|
||||||
setGrid(lastP->pos, 0); // set the old grid site to empty
|
setGrid(lastP->pos, 0); // set the old grid site to empty
|
||||||
// update the position
|
// update the position
|
||||||
particleList[numParticles - 1]->pos[0] = newpos[0];
|
particleList[this->particleList.size() - 1]->pos[0] = newpos[0];
|
||||||
particleList[numParticles - 1]->pos[1] = newpos[1];
|
particleList[this->particleList.size() - 1]->pos[1] = newpos[1];
|
||||||
setGrid(lastP->pos, 1); // set the new grid site to be occupied
|
setGrid(lastP->pos, 1); // set the new grid site to be occupied
|
||||||
|
|
||||||
// check if we stick
|
// check if we stick
|
||||||
if (checkStick()) {
|
if (checkStick() && this->rgen.random01() <= this->stickProbability) {
|
||||||
this->csv_out << newpos[0] << "," << newpos[1] << "\n";
|
this->csv_out << frame << "," << lastP->pos[0] << "," << lastP->pos[1] << endl;
|
||||||
this->csv_out.flush();
|
|
||||||
|
|
||||||
//cout << "stick" << endl;
|
|
||||||
setParticleInactive(); // make the particle inactive (stuck)
|
setParticleInactive(); // make the particle inactive (stuck)
|
||||||
updateClusterRadius(lastP->pos); // update the cluster radius, addCircle, etc.
|
updateClusterRadius(lastP->pos); // update the cluster radius, addCircle, etc.
|
||||||
|
|
||||||
if (numParticles % 100 == 0 && logfile.is_open()) {
|
|
||||||
logfile << numParticles << " " << clusterRadius << endl;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
// if we get to here then we are trying to move to an occupied site
|
|
||||||
// (this should never happen as long as the sticking probability is 1.0)
|
|
||||||
cout << "reject " << rr << endl;
|
|
||||||
cout << lastP->pos[0] << " " << lastP->pos[1] << endl;
|
|
||||||
//cout << newpos[0] << " " << newpos[1] << " " << (int)newpos[0] << endl;
|
|
||||||
//printOccupied();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if the last particle should stick (to a neighbour)
|
// check if the last particle should stick (to a neighbour)
|
||||||
int DLASystem::checkStick() {
|
int DLASystem::checkStick() {
|
||||||
Particle *lastP = particleList[numParticles - 1];
|
Particle *lastP = particleList[this->particleList.size() - 1];
|
||||||
int result = 0;
|
int result = 0;
|
||||||
// loop over neighbours
|
// loop over neighbours
|
||||||
for (int i = 0; i < 4; i++) {
|
for (int i = 0; i < 4; i++) {
|
||||||
double checkpos[2];
|
std::array<double, 2> checkpos{};
|
||||||
setPosNeighbour(checkpos, lastP->pos, i);
|
setPosNeighbour(checkpos, lastP->pos, i);
|
||||||
// if the neighbour is occupied...
|
// if the neighbour is occupied...
|
||||||
if (readGrid(checkpos) == 1)
|
if (readGrid(checkpos) == 1)
|
||||||
@ -236,42 +155,44 @@ int DLASystem::checkStick() {
|
|||||||
|
|
||||||
|
|
||||||
// constructor
|
// constructor
|
||||||
DLASystem::DLASystem(ofstream out_file) {
|
DLASystem::DLASystem(Config config)
|
||||||
cout << "creating system, gridSize " << gridSize << endl;
|
: stickProbability(config.stickProbability),
|
||||||
numParticles = 0;
|
grid(gridSize * gridSize),
|
||||||
endNum = 1000;
|
csv_out(std::move(config.csv)),
|
||||||
csv_out = std::move(out_file);
|
endNum(config.maxParticles),
|
||||||
|
frame(0),
|
||||||
|
running(false),
|
||||||
|
lastParticleIsActive(false) {
|
||||||
|
cout << "GridSize: " << gridSize << endl;
|
||||||
|
rgen.setSeed(config.seed);
|
||||||
|
|
||||||
// allocate memory for the grid, remember to free the memory in destructor
|
/*
|
||||||
grid = new int *[gridSize];
|
* Handle grid data structure.
|
||||||
for (int i = 0; i < gridSize; i++) {
|
* */
|
||||||
grid[i] = new int[gridSize];
|
// Add particle to the centre of the grid to start
|
||||||
}
|
std::array<double, 2> pos{0.0, 0.0};
|
||||||
slowNotFast = 0;
|
addParticle(pos);
|
||||||
running = true;
|
|
||||||
|
|
||||||
// reset initial parameters
|
// Make sure to include the central location in our csv.
|
||||||
Reset();
|
this->csv_out << 0 << "," << 0 << "," << 0 << std::endl;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* System behaviour parameters
|
||||||
|
* */
|
||||||
addRatio = 1.2; // how much bigger the addCircle should be, compared to cluster radius
|
addRatio = 1.2; // how much bigger the addCircle should be, compared to cluster radius
|
||||||
killRatio = 1.7; // how much bigger is the killCircle, compared to the addCircle
|
killRatio = 1.7; // how much bigger is the killCircle, compared to the addCircle
|
||||||
|
addCircle = 10;
|
||||||
// this opens a logfile, if we want to...
|
killCircle = 2.0 * addCircle;
|
||||||
//logfile.open("opfile.txt");
|
clusterRadius = 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// destructor
|
// destructor
|
||||||
DLASystem::~DLASystem() {
|
DLASystem::~DLASystem() {
|
||||||
// strictly we should not print inside the destructor but never mind...
|
|
||||||
cout << "deleting system" << endl;
|
|
||||||
// delete the particles
|
// delete the particles
|
||||||
clearParticles();
|
particleList.clear();
|
||||||
// delete the grid
|
|
||||||
for (int i = 0; i < gridSize; i++)
|
|
||||||
delete[] grid[i];
|
|
||||||
delete[] grid;
|
|
||||||
|
|
||||||
if (this->csv_out.is_open()) {
|
if (csv_out.is_open()) {
|
||||||
this->csv_out.close();
|
csv_out.flush();
|
||||||
|
csv_out.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
97
DLASystem.h
97
DLASystem.h
@ -2,12 +2,12 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <stdio.h>
|
#include <cstdio>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#define _USE_MATH_DEFINES
|
#define _USE_MATH_DEFINES
|
||||||
|
|
||||||
#include <math.h>
|
#include <cmath>
|
||||||
#include <random>
|
#include <random>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
@ -15,17 +15,21 @@
|
|||||||
#include "Particle.h"
|
#include "Particle.h"
|
||||||
#include "rnd.h"
|
#include "rnd.h"
|
||||||
|
|
||||||
using namespace std;
|
class Config {
|
||||||
|
public:
|
||||||
|
int seed;
|
||||||
|
double stickProbability;
|
||||||
|
std::ofstream csv;
|
||||||
|
int maxParticles;
|
||||||
|
|
||||||
|
Config(int argc, char **argv);
|
||||||
|
};
|
||||||
|
|
||||||
class DLASystem {
|
class DLASystem {
|
||||||
public:
|
private:
|
||||||
|
// these are private variables and functions that the user will not see
|
||||||
// list of particles
|
// list of particles
|
||||||
vector<Particle *> particleList;
|
std::vector<Particle *> particleList;
|
||||||
int numParticles;
|
|
||||||
|
|
||||||
// delete particles and clear the particle list
|
|
||||||
void clearParticles();
|
|
||||||
|
|
||||||
// size of cluster
|
// size of cluster
|
||||||
double clusterRadius;
|
double clusterRadius;
|
||||||
@ -33,21 +37,17 @@ public:
|
|||||||
double addCircle;
|
double addCircle;
|
||||||
double killCircle;
|
double killCircle;
|
||||||
|
|
||||||
ofstream csv_out;
|
double stickProbability;
|
||||||
|
|
||||||
// size of grid
|
// size of grid
|
||||||
static const int gridSize = 1600;
|
static const int gridSize = 1600;
|
||||||
int **grid; // this will be a 2d array that stores whether each site is occupied
|
std::vector<int> grid;
|
||||||
|
|
||||||
// the window draws only part of the grid, viewSize controls how much...
|
|
||||||
double viewSize;
|
|
||||||
double drawScale;
|
|
||||||
|
|
||||||
// random number generator, class name is rnd, instance is rgen
|
// random number generator, class name is rnd, instance is rgen
|
||||||
rnd rgen;
|
rnd rgen;
|
||||||
|
|
||||||
// output file (not used at the moment)
|
// output file (not used at the moment)
|
||||||
ofstream logfile;
|
std::ofstream csv_out;
|
||||||
|
|
||||||
// number of particles at which the simulation will stop
|
// number of particles at which the simulation will stop
|
||||||
// (the value is set in constructor)
|
// (the value is set in constructor)
|
||||||
@ -57,77 +57,52 @@ public:
|
|||||||
double addRatio; // how much bigger the addCircle should be, compared to cluster radius
|
double addRatio; // how much bigger the addCircle should be, compared to cluster radius
|
||||||
double killRatio; // how much bigger is the killCircle, compared to the addCircle
|
double killRatio; // how much bigger is the killCircle, compared to the addCircle
|
||||||
|
|
||||||
|
int frame;
|
||||||
|
|
||||||
|
int *index_grid(std::array<double, 2> pos) {
|
||||||
|
int halfGrid = gridSize / 2;
|
||||||
|
int i = (int) (pos[0] + halfGrid);
|
||||||
|
int j = (int) (pos[1] + halfGrid);
|
||||||
|
|
||||||
|
int ij = i * gridSize + j;
|
||||||
|
return &grid[ij];
|
||||||
|
}
|
||||||
public:
|
public:
|
||||||
// these are public variables and functions
|
// these are public variables and functions
|
||||||
|
|
||||||
// update the system: if there is an active particle then move it,
|
// update the system: if there is an active particle then move it,
|
||||||
// else create a new particle (on the adding circle)
|
// else create a new particle (on the adding circle)
|
||||||
bool Update();
|
void update();
|
||||||
|
|
||||||
// draw particles as squares
|
|
||||||
void DrawSquares();
|
|
||||||
|
|
||||||
// is the simulation running (1) or paused (0) ?
|
// is the simulation running (1) or paused (0) ?
|
||||||
int running;
|
bool running;
|
||||||
|
|
||||||
// slowNotFast is +1 for slow running, 0 for fast
|
|
||||||
int slowNotFast;
|
|
||||||
|
|
||||||
// lastParticleIsActive is +1 if there is an active particle in the system, otherwise 0
|
// lastParticleIsActive is +1 if there is an active particle in the system, otherwise 0
|
||||||
int lastParticleIsActive;
|
int lastParticleIsActive;
|
||||||
|
|
||||||
// constructor
|
// constructor
|
||||||
DLASystem(ofstream output);
|
explicit DLASystem(Config config);
|
||||||
|
|
||||||
// destructor
|
// destructor
|
||||||
~DLASystem();
|
~DLASystem();
|
||||||
|
|
||||||
// delete all particles and reset
|
|
||||||
void Reset();
|
|
||||||
|
|
||||||
// this sets the seed for the random numbers
|
// this sets the seed for the random numbers
|
||||||
void setSeed(int s) { rgen.setSeed(s); }
|
void setSeed(int s) { rgen.setSeed(s); }
|
||||||
|
|
||||||
// check whether we should stop (eg the cluster has reached the edge of the grid)
|
void setRunning() { running = true; }
|
||||||
int checkStop();
|
|
||||||
|
|
||||||
// stop/start the algorithm
|
void pauseRunning() { running = false; }
|
||||||
void setRunning() { if (checkStop() == 0) running = 1; }
|
|
||||||
|
|
||||||
void pauseRunning() { running = 0; }
|
|
||||||
|
|
||||||
// set whether it runs fast or slow
|
|
||||||
void setSlow() { slowNotFast = 1; }
|
|
||||||
|
|
||||||
void setFast() { slowNotFast = 0; }
|
|
||||||
|
|
||||||
void setSuperFast() { slowNotFast = -1; }
|
|
||||||
|
|
||||||
// set which part of the grid is visible on the screen
|
|
||||||
// basically the screen shows co-ordinates -vv < x < vv
|
|
||||||
// where vv is the input value
|
|
||||||
void setViewSize(double vv) {
|
|
||||||
viewSize = vv;
|
|
||||||
drawScale = 2.0 / viewSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
// if the killcircle is almost as big as the view then increase the view
|
|
||||||
void updateViewSize();
|
|
||||||
|
|
||||||
// set the view to be the approx size of the addCircle
|
|
||||||
void viewAddCircle();
|
|
||||||
|
|
||||||
// if pos is outside the cluster radius then set clusterRadius to be the distance to pos.
|
// if pos is outside the cluster radius then set clusterRadius to be the distance to pos.
|
||||||
void updateClusterRadius(double pos[]);
|
void updateClusterRadius(std::array<double, 2> pos);
|
||||||
|
|
||||||
// set and read grid entries associated with a given position
|
// set and read grid entries associated with a given position
|
||||||
void setGrid(double pos[], int val);
|
void setGrid(std::array<double, 2> pos, int val);
|
||||||
|
|
||||||
int readGrid(double pos[]);
|
int readGrid(std::array<double, 2> pos);
|
||||||
|
|
||||||
// return the distance of a given point from the origin
|
// return the distance of a given point from the origin
|
||||||
double distanceFromOrigin(double pos[]) {
|
double distanceFromOrigin(std::array<double, 2> pos) {
|
||||||
return sqrt(pos[0] * pos[0] + pos[1] * pos[1]);
|
return sqrt(pos[0] * pos[0] + pos[1] * pos[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -137,14 +112,14 @@ public:
|
|||||||
void setParticleInactive() { lastParticleIsActive = 0; }
|
void setParticleInactive() { lastParticleIsActive = 0; }
|
||||||
|
|
||||||
// add a particle at pos
|
// add a particle at pos
|
||||||
void addParticle(double pos[]);
|
void addParticle(std::array<double, 2> pos);
|
||||||
|
|
||||||
// add a particle at a random point on the addCircle
|
// add a particle at a random point on the addCircle
|
||||||
void addParticleOnAddCircle();
|
void addParticleOnAddCircle();
|
||||||
|
|
||||||
// assign setpos to the position of a neighbour of pos
|
// assign setpos to the position of a neighbour of pos
|
||||||
// which neighbour we look at is determined by val (=0,1,2,3)
|
// which neighbour we look at is determined by val (=0,1,2,3)
|
||||||
void setPosNeighbour(double setpos[], double pos[], int val);
|
void setPosNeighbour(std::array<double, 2> &setpos, std::array<double, 2> pos, int val);
|
||||||
|
|
||||||
// this attempts to move the last particle in the List to a random neighbour
|
// this attempts to move the last particle in the List to a random neighbour
|
||||||
// if the neighbour is occupied then nothing happens
|
// if the neighbour is occupied then nothing happens
|
||||||
|
|||||||
2
Makefile
2
Makefile
@ -14,7 +14,7 @@ CXXFLAGS = -Wall -Wextra -g -O0 -std=c++20 -stdlib=libc++
|
|||||||
|
|
||||||
IFLAGS = -I/usr/local/include -I/usr/include
|
IFLAGS = -I/usr/local/include -I/usr/include
|
||||||
|
|
||||||
LFLAGS = -L/usr/local/lib -lm -framework OpenGL -framework GLUT
|
LFLAGS = -L/usr/local/lib -lm
|
||||||
|
|
||||||
# ------------------------------------------
|
# ------------------------------------------
|
||||||
# FOR GENERIC MAKEFILE:
|
# FOR GENERIC MAKEFILE:
|
||||||
|
|||||||
20
Particle.h
20
Particle.h
@ -1,22 +1,14 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
#include <array>
|
||||||
|
|
||||||
class Particle {
|
class Particle {
|
||||||
public:
|
public:
|
||||||
static const int dim = 2; // we are in two dimensions
|
static const int dim = 2; // we are in two dimensions
|
||||||
double *pos; // pointer to an array of size dim, to store the position
|
std::array<double, dim> pos{};
|
||||||
|
|
||||||
// default constructor
|
// constructor, with a specified initial pos
|
||||||
Particle() {
|
explicit Particle(std::array<double, dim> pos) {
|
||||||
pos = new double[dim];
|
this->pos[0] = pos[0];
|
||||||
|
this->pos[1] = pos[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
// constructor, with a specified initial position
|
|
||||||
Particle(double set_pos[]) {
|
|
||||||
pos = new double[dim];
|
|
||||||
for (int d = 0; d < dim; d++)
|
|
||||||
pos[d] = set_pos[d];
|
|
||||||
}
|
|
||||||
|
|
||||||
// destructor
|
|
||||||
~Particle() { delete[] pos; }
|
|
||||||
};
|
};
|
||||||
|
|||||||
2087
example.csv
2087
example.csv
File diff suppressed because one or more lines are too long
3
harness.bash
Executable file
3
harness.bash
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
parallel "../run {1} {2} {3}" ::: $(seq 0 10) ::: $(seq 0 0.05 1) ::: $(seq 2000 1000 10000)
|
||||||
67
mainDLA.cpp
67
mainDLA.cpp
@ -1,43 +1,58 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <cmath>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
#include "DLASystem.h"
|
#include "DLASystem.h"
|
||||||
|
|
||||||
using namespace std;
|
using std::cout;
|
||||||
|
using std::endl;
|
||||||
|
|
||||||
// functions which are needed for openGL go into a namespace so that we can identify them
|
/*
|
||||||
namespace drawFuncs {
|
* In a proper project I would write a better argument parser, don't care here, just exit with an error if it is wrong.
|
||||||
void handleKeypress(unsigned char key, int x, int y);
|
* */
|
||||||
|
Config::Config(int argc, char **argv) {
|
||||||
|
if (argc != 4) {
|
||||||
|
exit(1);
|
||||||
|
} else {
|
||||||
|
this->seed = std::stoi(argv[1]);
|
||||||
|
this->stickProbability = std::stod(argv[2]);
|
||||||
|
this->maxParticles = std::stoi(argv[3]);
|
||||||
|
|
||||||
void display(void);
|
if (stickProbability <= 0 || stickProbability > 1) {
|
||||||
|
exit(1);
|
||||||
void update(int val);
|
|
||||||
|
|
||||||
void introMessage();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// this is a global pointer, which is how we access the system itself
|
std::stringstream str;
|
||||||
DLASystem *sys;
|
// Ensure the output file name contains all information required to replicate data
|
||||||
|
str << "./out-" << seed << '-' << stickProbability << "-" << maxParticles << ".csv";
|
||||||
|
std::ofstream csv_out(str.str());
|
||||||
|
this->csv = std::move(csv_out);
|
||||||
|
|
||||||
|
// Add headers to csv output
|
||||||
|
this->csv << "frame" << "," << "x" << "," << "y" << std::endl;
|
||||||
|
|
||||||
|
cout <<
|
||||||
|
"seed: " << seed << ", " <<
|
||||||
|
"stickProbability: " << stickProbability << ", " <<
|
||||||
|
"maxParticles: " << maxParticles <<
|
||||||
|
endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
const auto seed = std::stoi(argv[1]);
|
Config config(argc, argv);
|
||||||
char buffer[20];
|
|
||||||
snprintf(buffer, 20, "seed-%i.csv", seed);
|
|
||||||
const auto p1 = std::chrono::system_clock::now();
|
|
||||||
std::ofstream myfile;
|
|
||||||
myfile.open(buffer);
|
|
||||||
|
|
||||||
// create the system
|
// Create the system
|
||||||
sys = new DLASystem(std::move(myfile));
|
auto *sys = new DLASystem(std::move(config));
|
||||||
|
sys->setRunning();
|
||||||
|
|
||||||
// this is the seed for the random numbers
|
/*
|
||||||
cout << "setting seed " << seed << endl;
|
* NOTE: We run at max speed as rendering is handled by a different engine so we don't need to care.
|
||||||
sys->setSeed(seed);
|
* */
|
||||||
|
while (sys->running) {
|
||||||
while (sys->Update()) {
|
sys->update();
|
||||||
}
|
}
|
||||||
|
|
||||||
cout << sys->numParticles;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
1001
out-2-0.5-1000.csv
Normal file
1001
out-2-0.5-1000.csv
Normal file
File diff suppressed because it is too large
Load Diff
999
seed-2.csv
999
seed-2.csv
@ -1,999 +0,0 @@
|
|||||||
0,-1
|
|
||||||
-1,0
|
|
||||||
-1,1
|
|
||||||
0,-2
|
|
||||||
0,-3
|
|
||||||
-1,-2
|
|
||||||
1,-1
|
|
||||||
0,1
|
|
||||||
-1,-3
|
|
||||||
0,2
|
|
||||||
0,3
|
|
||||||
0,4
|
|
||||||
-1,3
|
|
||||||
1,-3
|
|
||||||
1,3
|
|
||||||
2,-1
|
|
||||||
-1,4
|
|
||||||
2,-3
|
|
||||||
-2,4
|
|
||||||
2,-4
|
|
||||||
0,-4
|
|
||||||
-3,4
|
|
||||||
3,-4
|
|
||||||
-4,4
|
|
||||||
-1,-1
|
|
||||||
0,-5
|
|
||||||
0,5
|
|
||||||
-4,5
|
|
||||||
4,-4
|
|
||||||
2,3
|
|
||||||
-5,4
|
|
||||||
0,-6
|
|
||||||
2,4
|
|
||||||
1,5
|
|
||||||
3,4
|
|
||||||
-5,5
|
|
||||||
3,3
|
|
||||||
3,5
|
|
||||||
5,-4
|
|
||||||
2,-5
|
|
||||||
5,-3
|
|
||||||
0,-7
|
|
||||||
6,-4
|
|
||||||
5,-2
|
|
||||||
1,-7
|
|
||||||
7,-4
|
|
||||||
4,5
|
|
||||||
7,-5
|
|
||||||
6,-2
|
|
||||||
0,-8
|
|
||||||
3,6
|
|
||||||
-4,6
|
|
||||||
0,6
|
|
||||||
-2,-3
|
|
||||||
-1,-6
|
|
||||||
4,3
|
|
||||||
-1,-8
|
|
||||||
-4,7
|
|
||||||
-2,-4
|
|
||||||
-5,3
|
|
||||||
-4,8
|
|
||||||
-1,-9
|
|
||||||
3,7
|
|
||||||
3,8
|
|
||||||
4,6
|
|
||||||
8,-5
|
|
||||||
-4,9
|
|
||||||
4,2
|
|
||||||
5,6
|
|
||||||
7,-2
|
|
||||||
7,-6
|
|
||||||
-6,3
|
|
||||||
-1,-10
|
|
||||||
-5,9
|
|
||||||
-1,-11
|
|
||||||
-3,8
|
|
||||||
-2,-11
|
|
||||||
5,3
|
|
||||||
-5,10
|
|
||||||
9,-5
|
|
||||||
-5,11
|
|
||||||
-3,-3
|
|
||||||
10,-5
|
|
||||||
8,-2
|
|
||||||
-5,12
|
|
||||||
-2,-9
|
|
||||||
4,8
|
|
||||||
10,-6
|
|
||||||
-1,-12
|
|
||||||
-3,-11
|
|
||||||
11,-6
|
|
||||||
12,-6
|
|
||||||
-3,-12
|
|
||||||
-6,2
|
|
||||||
-4,-3
|
|
||||||
-7,3
|
|
||||||
0,-12
|
|
||||||
2,8
|
|
||||||
6,6
|
|
||||||
-5,8
|
|
||||||
-7,4
|
|
||||||
-6,10
|
|
||||||
1,-12
|
|
||||||
5,8
|
|
||||||
12,-5
|
|
||||||
-2,-6
|
|
||||||
4,9
|
|
||||||
-4,-11
|
|
||||||
2,-12
|
|
||||||
2,9
|
|
||||||
-6,12
|
|
||||||
2,-6
|
|
||||||
-6,9
|
|
||||||
-3,-6
|
|
||||||
12,-4
|
|
||||||
-5,-11
|
|
||||||
4,-5
|
|
||||||
7,6
|
|
||||||
11,-4
|
|
||||||
-2,-12
|
|
||||||
-1,-13
|
|
||||||
-8,3
|
|
||||||
-7,12
|
|
||||||
-5,-10
|
|
||||||
12,-7
|
|
||||||
2,-13
|
|
||||||
-7,13
|
|
||||||
-6,13
|
|
||||||
1,8
|
|
||||||
-9,3
|
|
||||||
-10,3
|
|
||||||
6,8
|
|
||||||
12,-3
|
|
||||||
6,9
|
|
||||||
-6,5
|
|
||||||
13,-7
|
|
||||||
6,10
|
|
||||||
-10,2
|
|
||||||
-5,13
|
|
||||||
8,6
|
|
||||||
-6,8
|
|
||||||
11,-7
|
|
||||||
-7,8
|
|
||||||
8,-6
|
|
||||||
-6,14
|
|
||||||
-10,4
|
|
||||||
-8,13
|
|
||||||
6,11
|
|
||||||
-11,3
|
|
||||||
2,-11
|
|
||||||
-5,14
|
|
||||||
5,11
|
|
||||||
14,-7
|
|
||||||
3,-11
|
|
||||||
12,-2
|
|
||||||
-6,1
|
|
||||||
-12,3
|
|
||||||
14,-8
|
|
||||||
2,-14
|
|
||||||
15,-8
|
|
||||||
-12,4
|
|
||||||
-2,-13
|
|
||||||
6,12
|
|
||||||
15,-9
|
|
||||||
15,-7
|
|
||||||
-4,14
|
|
||||||
9,6
|
|
||||||
13,-4
|
|
||||||
-4,15
|
|
||||||
-3,15
|
|
||||||
13,-2
|
|
||||||
14,-9
|
|
||||||
15,-10
|
|
||||||
-13,3
|
|
||||||
16,-10
|
|
||||||
9,7
|
|
||||||
2,-15
|
|
||||||
-14,3
|
|
||||||
3,-15
|
|
||||||
-8,12
|
|
||||||
9,8
|
|
||||||
13,-1
|
|
||||||
17,-10
|
|
||||||
-15,3
|
|
||||||
-12,5
|
|
||||||
10,7
|
|
||||||
14,-4
|
|
||||||
11,7
|
|
||||||
-6,-11
|
|
||||||
-6,15
|
|
||||||
-6,-12
|
|
||||||
-8,14
|
|
||||||
18,-10
|
|
||||||
-7,-11
|
|
||||||
17,-11
|
|
||||||
3,-13
|
|
||||||
11,6
|
|
||||||
-14,2
|
|
||||||
12,6
|
|
||||||
-9,14
|
|
||||||
12,-8
|
|
||||||
-14,4
|
|
||||||
-5,15
|
|
||||||
-9,15
|
|
||||||
14,-1
|
|
||||||
-16,3
|
|
||||||
17,-12
|
|
||||||
-6,-13
|
|
||||||
-9,16
|
|
||||||
-8,16
|
|
||||||
13,0
|
|
||||||
15,-11
|
|
||||||
14,0
|
|
||||||
-6,16
|
|
||||||
-7,-13
|
|
||||||
-6,-10
|
|
||||||
14,1
|
|
||||||
-16,4
|
|
||||||
-7,-14
|
|
||||||
17,-13
|
|
||||||
-5,16
|
|
||||||
-5,-13
|
|
||||||
-8,17
|
|
||||||
-16,2
|
|
||||||
-16,5
|
|
||||||
-7,-15
|
|
||||||
-16,1
|
|
||||||
-5,-14
|
|
||||||
18,-13
|
|
||||||
-8,-15
|
|
||||||
18,-14
|
|
||||||
10,8
|
|
||||||
19,-13
|
|
||||||
-9,17
|
|
||||||
-6,17
|
|
||||||
-13,5
|
|
||||||
-2,15
|
|
||||||
-16,0
|
|
||||||
-17,1
|
|
||||||
15,-12
|
|
||||||
13,6
|
|
||||||
-8,8
|
|
||||||
12,5
|
|
||||||
14,-12
|
|
||||||
-18,1
|
|
||||||
19,-14
|
|
||||||
-8,18
|
|
||||||
-17,3
|
|
||||||
7,12
|
|
||||||
-19,1
|
|
||||||
-8,-13
|
|
||||||
2,-16
|
|
||||||
-5,-15
|
|
||||||
-20,1
|
|
||||||
13,-12
|
|
||||||
-8,-11
|
|
||||||
18,-15
|
|
||||||
-7,-16
|
|
||||||
7,13
|
|
||||||
-9,-15
|
|
||||||
6,13
|
|
||||||
15,-6
|
|
||||||
17,-15
|
|
||||||
-8,9
|
|
||||||
19,-15
|
|
||||||
-17,5
|
|
||||||
19,-16
|
|
||||||
-9,18
|
|
||||||
19,-17
|
|
||||||
-9,19
|
|
||||||
19,-12
|
|
||||||
-9,-16
|
|
||||||
19,-18
|
|
||||||
-10,-15
|
|
||||||
20,-18
|
|
||||||
21,-18
|
|
||||||
3,-16
|
|
||||||
7,14
|
|
||||||
15,1
|
|
||||||
-12,2
|
|
||||||
21,-17
|
|
||||||
-9,-13
|
|
||||||
15,-1
|
|
||||||
-7,-17
|
|
||||||
-13,6
|
|
||||||
8,12
|
|
||||||
21,-16
|
|
||||||
-2,14
|
|
||||||
16,1
|
|
||||||
7,15
|
|
||||||
10,9
|
|
||||||
-20,0
|
|
||||||
19,-11
|
|
||||||
-10,-13
|
|
||||||
17,-16
|
|
||||||
11,9
|
|
||||||
9,12
|
|
||||||
3,-17
|
|
||||||
8,15
|
|
||||||
7,16
|
|
||||||
-20,2
|
|
||||||
13,7
|
|
||||||
-7,1
|
|
||||||
-2,16
|
|
||||||
-6,-17
|
|
||||||
22,-18
|
|
||||||
22,-19
|
|
||||||
17,1
|
|
||||||
-17,6
|
|
||||||
-8,-17
|
|
||||||
14,7
|
|
||||||
-10,5
|
|
||||||
7,17
|
|
||||||
15,2
|
|
||||||
8,16
|
|
||||||
23,-19
|
|
||||||
9,15
|
|
||||||
-21,0
|
|
||||||
18,-18
|
|
||||||
21,-19
|
|
||||||
-1,16
|
|
||||||
-9,-11
|
|
||||||
-8,-10
|
|
||||||
24,-19
|
|
||||||
-17,7
|
|
||||||
18,-19
|
|
||||||
-21,-1
|
|
||||||
-11,-13
|
|
||||||
25,-19
|
|
||||||
-11,-15
|
|
||||||
17,2
|
|
||||||
9,16
|
|
||||||
26,-19
|
|
||||||
-7,18
|
|
||||||
25,-20
|
|
||||||
20,-11
|
|
||||||
-12,-15
|
|
||||||
-5,-17
|
|
||||||
26,-18
|
|
||||||
10,16
|
|
||||||
11,16
|
|
||||||
15,7
|
|
||||||
-10,-11
|
|
||||||
24,-18
|
|
||||||
-9,-17
|
|
||||||
7,18
|
|
||||||
-14,1
|
|
||||||
12,9
|
|
||||||
25,-21
|
|
||||||
26,-21
|
|
||||||
11,17
|
|
||||||
-10,16
|
|
||||||
-5,-9
|
|
||||||
-22,0
|
|
||||||
3,-18
|
|
||||||
-14,0
|
|
||||||
0,16
|
|
||||||
-8,19
|
|
||||||
-23,0
|
|
||||||
0,17
|
|
||||||
-23,-1
|
|
||||||
-10,19
|
|
||||||
-21,2
|
|
||||||
18,-20
|
|
||||||
-18,3
|
|
||||||
-24,-1
|
|
||||||
18,2
|
|
||||||
27,-18
|
|
||||||
-1,17
|
|
||||||
16,-6
|
|
||||||
26,-22
|
|
||||||
18,1
|
|
||||||
28,-18
|
|
||||||
26,-17
|
|
||||||
20,-10
|
|
||||||
17,-20
|
|
||||||
7,19
|
|
||||||
-17,8
|
|
||||||
6,19
|
|
||||||
21,-20
|
|
||||||
-18,5
|
|
||||||
0,18
|
|
||||||
-11,-16
|
|
||||||
18,3
|
|
||||||
-19,5
|
|
||||||
-10,20
|
|
||||||
27,-22
|
|
||||||
20,-20
|
|
||||||
-8,-18
|
|
||||||
-5,-18
|
|
||||||
19,3
|
|
||||||
-25,-1
|
|
||||||
29,-18
|
|
||||||
-11,-11
|
|
||||||
30,-18
|
|
||||||
-4,-18
|
|
||||||
-12,-16
|
|
||||||
8,19
|
|
||||||
-24,-2
|
|
||||||
20,3
|
|
||||||
1,18
|
|
||||||
-21,3
|
|
||||||
18,-21
|
|
||||||
-1,18
|
|
||||||
21,-11
|
|
||||||
8,20
|
|
||||||
-3,-18
|
|
||||||
-26,-1
|
|
||||||
20,4
|
|
||||||
16,-20
|
|
||||||
4,-15
|
|
||||||
31,-18
|
|
||||||
5,19
|
|
||||||
-8,20
|
|
||||||
26,-23
|
|
||||||
28,-22
|
|
||||||
-13,-15
|
|
||||||
-8,21
|
|
||||||
-18,8
|
|
||||||
28,-23
|
|
||||||
-17,9
|
|
||||||
-21,4
|
|
||||||
-26,0
|
|
||||||
18,4
|
|
||||||
-18,9
|
|
||||||
18,5
|
|
||||||
-3,-19
|
|
||||||
-1,19
|
|
||||||
29,-22
|
|
||||||
-13,-16
|
|
||||||
-24,-3
|
|
||||||
-11,20
|
|
||||||
-26,-2
|
|
||||||
-21,5
|
|
||||||
22,-11
|
|
||||||
10,17
|
|
||||||
11,18
|
|
||||||
-10,17
|
|
||||||
11,19
|
|
||||||
-12,20
|
|
||||||
21,4
|
|
||||||
7,20
|
|
||||||
18,6
|
|
||||||
-24,-4
|
|
||||||
17,0
|
|
||||||
12,16
|
|
||||||
-2,-19
|
|
||||||
30,-17
|
|
||||||
-16,9
|
|
||||||
29,-23
|
|
||||||
13,16
|
|
||||||
26,-24
|
|
||||||
-8,22
|
|
||||||
-8,23
|
|
||||||
21,3
|
|
||||||
-24,-5
|
|
||||||
-24,-6
|
|
||||||
8,21
|
|
||||||
-11,17
|
|
||||||
-11,2
|
|
||||||
-19,6
|
|
||||||
29,-21
|
|
||||||
18,-9
|
|
||||||
-13,-17
|
|
||||||
19,-21
|
|
||||||
-16,10
|
|
||||||
-14,-17
|
|
||||||
21,-21
|
|
||||||
-8,24
|
|
||||||
32,-18
|
|
||||||
32,-19
|
|
||||||
6,20
|
|
||||||
-9,24
|
|
||||||
-8,-9
|
|
||||||
18,-22
|
|
||||||
-12,17
|
|
||||||
-27,-2
|
|
||||||
26,-25
|
|
||||||
-20,-1
|
|
||||||
-8,25
|
|
||||||
-2,19
|
|
||||||
14,16
|
|
||||||
-9,25
|
|
||||||
22,-12
|
|
||||||
3,-19
|
|
||||||
-13,-18
|
|
||||||
-28,-2
|
|
||||||
-28,-1
|
|
||||||
-27,-3
|
|
||||||
18,-8
|
|
||||||
25,-22
|
|
||||||
24,-22
|
|
||||||
33,-18
|
|
||||||
-13,-14
|
|
||||||
-22,5
|
|
||||||
22,4
|
|
||||||
14,-13
|
|
||||||
-23,5
|
|
||||||
22,3
|
|
||||||
-28,-3
|
|
||||||
-29,-1
|
|
||||||
-19,9
|
|
||||||
9,20
|
|
||||||
-28,-4
|
|
||||||
23,3
|
|
||||||
-14,-14
|
|
||||||
29,-24
|
|
||||||
-26,1
|
|
||||||
-24,5
|
|
||||||
23,4
|
|
||||||
23,-22
|
|
||||||
-12,16
|
|
||||||
-15,-17
|
|
||||||
23,-11
|
|
||||||
-4,-19
|
|
||||||
9,21
|
|
||||||
32,-20
|
|
||||||
-4,-20
|
|
||||||
24,-11
|
|
||||||
33,-20
|
|
||||||
11,20
|
|
||||||
-26,2
|
|
||||||
15,16
|
|
||||||
30,-16
|
|
||||||
10,21
|
|
||||||
11,21
|
|
||||||
-9,-18
|
|
||||||
-24,6
|
|
||||||
34,-20
|
|
||||||
-29,-4
|
|
||||||
3,-20
|
|
||||||
-8,26
|
|
||||||
6,21
|
|
||||||
-8,-19
|
|
||||||
18,-23
|
|
||||||
32,-21
|
|
||||||
33,-17
|
|
||||||
29,-25
|
|
||||||
-15,-14
|
|
||||||
25,-25
|
|
||||||
-15,-18
|
|
||||||
-7,26
|
|
||||||
-12,-18
|
|
||||||
-2,20
|
|
||||||
-27,2
|
|
||||||
-24,7
|
|
||||||
29,-26
|
|
||||||
-8,27
|
|
||||||
32,-22
|
|
||||||
21,2
|
|
||||||
24,3
|
|
||||||
11,22
|
|
||||||
12,22
|
|
||||||
2,-20
|
|
||||||
25,-11
|
|
||||||
-7,27
|
|
||||||
29,-27
|
|
||||||
2,-21
|
|
||||||
30,-15
|
|
||||||
34,-18
|
|
||||||
-16,-17
|
|
||||||
33,-16
|
|
||||||
-15,-19
|
|
||||||
29,-15
|
|
||||||
-8,28
|
|
||||||
13,22
|
|
||||||
29,-28
|
|
||||||
-2,-18
|
|
||||||
-24,8
|
|
||||||
-28,-5
|
|
||||||
26,-11
|
|
||||||
6,22
|
|
||||||
17,-23
|
|
||||||
30,-27
|
|
||||||
-6,26
|
|
||||||
33,-22
|
|
||||||
-29,0
|
|
||||||
16,-23
|
|
||||||
31,-27
|
|
||||||
-15,-13
|
|
||||||
25,-26
|
|
||||||
-12,21
|
|
||||||
21,5
|
|
||||||
32,-23
|
|
||||||
-2,21
|
|
||||||
15,17
|
|
||||||
11,23
|
|
||||||
29,-29
|
|
||||||
1,-21
|
|
||||||
-18,0
|
|
||||||
18,-24
|
|
||||||
18,-25
|
|
||||||
12,10
|
|
||||||
15,18
|
|
||||||
-29,-2
|
|
||||||
-28,2
|
|
||||||
-16,-19
|
|
||||||
29,-14
|
|
||||||
30,-29
|
|
||||||
-9,28
|
|
||||||
-9,9
|
|
||||||
35,-18
|
|
||||||
-25,-6
|
|
||||||
14,22
|
|
||||||
-14,-19
|
|
||||||
-13,21
|
|
||||||
-8,29
|
|
||||||
14,23
|
|
||||||
6,23
|
|
||||||
17,-25
|
|
||||||
23,-23
|
|
||||||
25,-27
|
|
||||||
29,-30
|
|
||||||
13,23
|
|
||||||
36,-18
|
|
||||||
27,-11
|
|
||||||
-13,16
|
|
||||||
-9,29
|
|
||||||
-7,29
|
|
||||||
34,-16
|
|
||||||
-17,-19
|
|
||||||
-16,-14
|
|
||||||
-30,-4
|
|
||||||
29,-31
|
|
||||||
15,19
|
|
||||||
6,24
|
|
||||||
-30,-5
|
|
||||||
32,-24
|
|
||||||
34,-15
|
|
||||||
-16,-20
|
|
||||||
25,3
|
|
||||||
-17,-14
|
|
||||||
1,-22
|
|
||||||
-16,11
|
|
||||||
-7,-19
|
|
||||||
15,23
|
|
||||||
-20,9
|
|
||||||
21,1
|
|
||||||
-7,30
|
|
||||||
-24,9
|
|
||||||
15,15
|
|
||||||
29,-32
|
|
||||||
-24,10
|
|
||||||
35,-15
|
|
||||||
34,-14
|
|
||||||
-6,29
|
|
||||||
-29,2
|
|
||||||
-16,-21
|
|
||||||
13,24
|
|
||||||
15,-23
|
|
||||||
25,4
|
|
||||||
-18,-19
|
|
||||||
17,-26
|
|
||||||
-17,-21
|
|
||||||
35,-14
|
|
||||||
-30,-2
|
|
||||||
35,-20
|
|
||||||
-24,11
|
|
||||||
-31,-5
|
|
||||||
15,24
|
|
||||||
19,-25
|
|
||||||
32,-27
|
|
||||||
37,-18
|
|
||||||
15,25
|
|
||||||
16,17
|
|
||||||
-25,5
|
|
||||||
36,-15
|
|
||||||
16,-26
|
|
||||||
-16,-22
|
|
||||||
-16,-23
|
|
||||||
-17,-23
|
|
||||||
-25,11
|
|
||||||
31,-29
|
|
||||||
-29,3
|
|
||||||
28,-32
|
|
||||||
-4,-21
|
|
||||||
26,4
|
|
||||||
6,25
|
|
||||||
36,-20
|
|
||||||
-17,-15
|
|
||||||
26,5
|
|
||||||
-17,-22
|
|
||||||
-31,-2
|
|
||||||
29,-33
|
|
||||||
-14,21
|
|
||||||
-12,-19
|
|
||||||
-10,29
|
|
||||||
38,-18
|
|
||||||
-25,10
|
|
||||||
38,-17
|
|
||||||
20,-25
|
|
||||||
39,-18
|
|
||||||
33,-27
|
|
||||||
24,-27
|
|
||||||
33,-28
|
|
||||||
40,-18
|
|
||||||
-30,2
|
|
||||||
-30,-6
|
|
||||||
41,-18
|
|
||||||
33,-29
|
|
||||||
-5,29
|
|
||||||
26,6
|
|
||||||
42,-18
|
|
||||||
-24,-7
|
|
||||||
-15,-23
|
|
||||||
27,6
|
|
||||||
-16,-24
|
|
||||||
-7,31
|
|
||||||
-13,22
|
|
||||||
43,-18
|
|
||||||
27,7
|
|
||||||
36,-21
|
|
||||||
-11,29
|
|
||||||
30,-33
|
|
||||||
28,-33
|
|
||||||
15,-22
|
|
||||||
-26,11
|
|
||||||
-25,-7
|
|
||||||
34,-28
|
|
||||||
-18,-20
|
|
||||||
17,-27
|
|
||||||
29,-13
|
|
||||||
14,25
|
|
||||||
27,-10
|
|
||||||
28,7
|
|
||||||
-10,30
|
|
||||||
41,-17
|
|
||||||
-11,30
|
|
||||||
-6,31
|
|
||||||
27,8
|
|
||||||
-30,0
|
|
||||||
29,-12
|
|
||||||
-24,-8
|
|
||||||
39,-19
|
|
||||||
-27,11
|
|
||||||
16,25
|
|
||||||
33,-30
|
|
||||||
-15,21
|
|
||||||
29,-11
|
|
||||||
16,26
|
|
||||||
-27,10
|
|
||||||
42,-17
|
|
||||||
-30,-7
|
|
||||||
-18,-22
|
|
||||||
27,-33
|
|
||||||
5,25
|
|
||||||
41,-16
|
|
||||||
-19,-22
|
|
||||||
31,-33
|
|
||||||
-29,4
|
|
||||||
26,-33
|
|
||||||
43,-19
|
|
||||||
27,9
|
|
||||||
19,-26
|
|
||||||
33,-31
|
|
||||||
27,10
|
|
||||||
-32,-2
|
|
||||||
44,-19
|
|
||||||
-12,29
|
|
||||||
43,-20
|
|
||||||
-13,23
|
|
||||||
-31,2
|
|
||||||
43,-21
|
|
||||||
-27,12
|
|
||||||
44,-20
|
|
||||||
15,-26
|
|
||||||
30,-34
|
|
||||||
5,26
|
|
||||||
-32,-1
|
|
||||||
-15,-24
|
|
||||||
-18,-23
|
|
||||||
-15,22
|
|
||||||
-5,26
|
|
||||||
28,10
|
|
||||||
42,-16
|
|
||||||
-20,10
|
|
||||||
-13,29
|
|
||||||
17,26
|
|
||||||
-30,-8
|
|
||||||
-28,10
|
|
||||||
5,27
|
|
||||||
26,3
|
|
||||||
11,24
|
|
||||||
6,27
|
|
||||||
-24,-9
|
|
||||||
-16,-25
|
|
||||||
43,-16
|
|
||||||
-3,-21
|
|
||||||
-27,13
|
|
||||||
-16,22
|
|
||||||
-29,10
|
|
||||||
18,26
|
|
||||||
16,19
|
|
||||||
44,-18
|
|
||||||
-2,-21
|
|
||||||
-12,28
|
|
||||||
4,27
|
|
||||||
44,-21
|
|
||||||
45,-18
|
|
||||||
33,-32
|
|
||||||
4,28
|
|
||||||
46,-18
|
|
||||||
17,19
|
|
||||||
-28,13
|
|
||||||
16,-27
|
|
||||||
26,2
|
|
||||||
-27,14
|
|
||||||
27,11
|
|
||||||
46,-19
|
|
||||||
-28,14
|
|
||||||
-7,32
|
|
||||||
34,-32
|
|
||||||
46,-17
|
|
||||||
-10,31
|
|
||||||
-19,-19
|
|
||||||
-29,13
|
|
||||||
2,-22
|
|
||||||
17,-28
|
|
||||||
42,-15
|
|
||||||
-17,-25
|
|
||||||
16,27
|
|
||||||
16,28
|
|
||||||
29,-10
|
|
||||||
-32,2
|
|
||||||
18,25
|
|
||||||
19,26
|
|
||||||
-13,28
|
|
||||||
-33,-1
|
|
||||||
-14,-23
|
|
||||||
-8,-20
|
|
||||||
16,-28
|
|
||||||
37,-21
|
|
||||||
26,-34
|
|
||||||
-6,-19
|
|
||||||
17,28
|
|
||||||
20,26
|
|
||||||
16,29
|
|
||||||
-7,33
|
|
||||||
-14,28
|
|
||||||
34,-31
|
|
||||||
-26,14
|
|
||||||
28,-34
|
|
||||||
-17,-26
|
|
||||||
-13,27
|
|
||||||
45,-21
|
|
||||||
46,-16
|
|
||||||
24,-28
|
|
||||||
-32,-5
|
|
||||||
46,-21
|
|
||||||
43,-15
|
|
||||||
17,29
|
|
||||||
28,-35
|
|
||||||
47,-19
|
|
||||||
45,-22
|
|
||||||
17,-29
|
|
||||||
14,26
|
|
||||||
-33,2
|
|
||||||
-20,-19
|
|
||||||
-17,22
|
|
||||||
18,29
|
|
||||||
15,8
|
|
||||||
45,-23
|
|
||||||
14,27
|
|
||||||
-34,-1
|
|
||||||
-35,-1
|
|
||||||
-14,23
|
|
||||||
46,-15
|
|
||||||
-10,32
|
|
||||||
34,-33
|
|
||||||
-34,2
|
|
||||||
-5,-21
|
|
||||||
-32,-6
|
|
||||||
43,-14
|
|
||||||
-13,26
|
|
||||||
46,-14
|
|
||||||
47,-17
|
|
||||||
-20,-22
|
|
||||||
25,-34
|
|
||||||
-2,-22
|
|
||||||
28,-29
|
|
||||||
28,6
|
|
||||||
-31,-8
|
|
||||||
47,-20
|
|
||||||
-25,14
|
|
||||||
-13,-23
|
|
||||||
5,28
|
|
||||||
-31,-9
|
|
||||||
28,11
|
|
||||||
-8,-21
|
|
||||||
46,-23
|
|
||||||
17,20
|
|
||||||
-36,-1
|
|
||||||
-21,-22
|
|
||||||
-7,34
|
|
||||||
27,2
|
|
||||||
47,-23
|
|
||||||
-7,35
|
|
||||||
48,-17
|
|
||||||
35,-28
|
|
||||||
35,-31
|
|
||||||
-13,-24
|
|
||||||
48,-19
|
|
||||||
47,-14
|
|
||||||
49,-17
|
|
||||||
17,-30
|
|
||||||
33,-14
|
|
||||||
42,-14
|
|
||||||
27,12
|
|
||||||
43,-22
|
|
||||||
-12,30
|
|
||||||
27,-9
|
|
||||||
46,-24
|
|
||||||
-29,5
|
|
||||||
18,30
|
|
||||||
19,30
|
|
||||||
-6,35
|
|
||||||
16,-30
|
|
||||||
29,6
|
|
||||||
20,25
|
|
||||||
13,27
|
|
||||||
-37,-1
|
|
||||||
-12,31
|
|
||||||
47,-24
|
|
||||||
33,-33
|
|
||||||
-4,26
|
|
||||||
-33,-6
|
|
||||||
-32,-9
|
|
||||||
-15,28
|
|
||||||
21,26
|
|
||||||
48,-23
|
|
||||||
18,31
|
|
||||||
22,26
|
|
||||||
-9,32
|
|
||||||
-15,29
|
|
||||||
-34,1
|
|
||||||
47,-25
|
|
||||||
48,-14
|
|
||||||
18,20
|
|
||||||
18,32
|
|
||||||
49,-18
|
|
||||||
-38,-1
|
|
||||||
45,-14
|
|
||||||
42,-13
|
|
||||||
-18,-25
|
|
||||||
21,25
|
|
||||||
49,-23
|
|
||||||
-39,-1
|
|
||||||
-39,0
|
|
||||||
45,-24
|
|
||||||
49,-14
|
|
||||||
31,-34
|
|
||||||
31,-35
|
|
||||||
-39,1
|
|
||||||
-16,29
|
|
||||||
-18,-26
|
|
||||||
4,29
|
|
||||||
22,27
|
|
||||||
42,-12
|
|
||||||
28,-36
|
|
||||||
25,-35
|
|
||||||
-40,-1
|
|
||||||
15,-21
|
|
||||||
32,-35
|
|
||||||
49,-13
|
|
||||||
29,-9
|
|
||||||
27,1
|
|
||||||
50,-23
|
|
||||||
-15,30
|
|
||||||
-27,15
|
|
||||||
49,-22
|
|
||||||
18,33
|
|
||||||
-8,-22
|
|
||||||
49,-15
|
|
||||||
-5,35
|
|
||||||
-34,-6
|
|
||||||
-18,-27
|
|
||||||
16,15
|
|
||||||
18,34
|
|
||||||
17,34
|
|
||||||
23,26
|
|
||||||
50,-13
|
|
||||||
-16,30
|
|
||||||
16,-31
|
|
||||||
-41,-1
|
|
||||||
35,-27
|
|
||||||
-34,3
|
|
||||||
50,-17
|
|
||||||
33,-35
|
|
||||||
-27,16
|
|
||||||
-42,-1
|
|
||||||
-41,-2
|
|
||||||
27,13
|
|
||||||
-2,-23
|
|
||||||
14,28
|
|
||||||
15,-28
|
|
||||||
16,-32
|
|
||||||
14,-23
|
|
||||||
-26,16
|
|
||||||
-18,-28
|
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user