Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

Mapping a 3D Sphere with GPS data possible?

$
0
0

Hello I'm totally new to this forum but I've been using Processing for 6 months now in terms of my Design study, so I'm not really used to the technical jargon of the programming world.

I have a Vision of a Project for this Semester that I simply started to sketch but I don't know if it's even possible.

As for now all I have is a Globe that I can view from different angles through PeasyCam. For my Project I want specific Emojis tweeted around the Globe shown at the Location they come from on my Globe. (Live Data Visualization)

Is it even possible? Because as for now I haven't found anything similar done in Processing on the net. Is there a Tool/Library or whatever to map the GPS date in my 3D Globe?

I know its not much so far but this is the code for my Globe

import peasy.*;
import peasy.org.apache.commons.math.*;
import peasy.org.apache.commons.math.geometry.*;

Planet earth;

PeasyCam cam;
PImage img;
PImage bg;

void setup() {
  size (1000, 600, P3D);
  img = loadImage("World3.jpg");
  //int i = 10;

  cam = new PeasyCam(this, 200);
  earth = new Planet(50);
}

void draw() {
  bg = loadImage("Black.png");
  background(bg);
  lights();
  earth.show();
}

______



class Planet {
  float radius;
  float angle;
  float distance;
  Planet [] planets;
  float orbitSpeed;
  PVector v;



  PShape globe;

  Planet (float r) {
    v = PVector.random3D();
    radius = r;
    noStroke();
    noFill();
    globe = createShape(SPHERE, radius);
    globe.setTexture(img);
  }

  void show () {
    pushMatrix();
    noStroke();
    fill(255);
    //rotate(angle);
    translate(v.x, v.y, v.z);
    shape(globe);
    popMatrix();
  }
}

Thanks in advance!


Viewing all articles
Browse latest Browse all 2896

Trending Articles