summaryrefslogtreecommitdiff
path: root/vodaviz.pde
diff options
context:
space:
mode:
Diffstat (limited to 'vodaviz.pde')
-rw-r--r--vodaviz.pde24
1 files changed, 13 insertions, 11 deletions
diff --git a/vodaviz.pde b/vodaviz.pde
index 7d4ed25..3590b93 100644
--- a/vodaviz.pde
+++ b/vodaviz.pde
@@ -167,7 +167,7 @@ String mode;
csvloader data;
calldata calls;
-country Ireland;
+bitmapcountry Ireland;
PImage lightmap;
@@ -189,11 +189,12 @@ void setup(){
smap = new sphereMap();
lightmap=loadImage("earthlights2_dmsp_big.jpg");
- image(lightmap,0,0,getWidth(),getHeight());
+
RG.ignoreStyles();
println("loaded svg in "+((millis()-m)*.001)+" seconds");
- Ireland=new country("Ireland",0,0,shp.children[0]);
+ Ireland=new bitmapcountry("Ireland",0,0,shp.children[0]);
+ Ireland.analyse(18.279,746.302,129.314,374.293);
data=new csvloader("calls.csv");
calls=new calldata(data.data,shp);
@@ -218,11 +219,12 @@ int i=0;
int j=0;
void draw() {
-
+ //if (i==0) image(lightmap,0,0,getWidth(),getHeight());
+
//pick a random colour
- stroke(random(150)+100,random(150)+100,random(150)+100,10);
+ stroke(random(150)+10,random(150)+10,random(150)+10);
- if (false) //draw globe
+ if (true) //draw globe
{
if (true) { //draw countries
beginShape();
@@ -239,8 +241,8 @@ void draw() {
if (true) {
for (int j=0;j<calls.countries.get(i).calls*.001;j++) {
- RPoint s=calls.countries.get(i).getpoint(100);
- RPoint e=Ireland.getpoint(100);
+ RPoint s=calls.countries.get(i).getpoint();
+ RPoint e=Ireland.getpoint();
if (s.x>0&&e.x>0){ //point found
RPoint sp=ptrans.form(pnorm.alise(s));
RPoint ep=ptrans.form(pnorm.alise(e));
@@ -257,7 +259,7 @@ void draw() {
}
}
- else
+ else //draw 2D
{
if (true) { //draw countries
beginShape();
@@ -272,8 +274,8 @@ void draw() {
}
if (true) { //draw lines
for (int j=0;j<log10(calls.countries.get(i).calls)*100;j++) {
- RPoint s=calls.countries.get(i).getpoint(100);
- RPoint e=Ireland.getpoint(100);
+ RPoint s=calls.countries.get(i).getpoint();
+ RPoint e=Ireland.getpoint();
if (s.x>0&&e.x>0){ //point found
RPoint Sp=screenMapper(pnorm.alise(s));
RPoint Ep=screenMapper(pnorm.alise(e));