I am stumbling a bit through my code here. The accelerometer and compass work just fine, but my MapMovement class has been causing a "cannot find symbol" error. Below is the code from the body, followed by the code from the tab I created for MapMovement:
MapMovement move;
float sp = 0.5;
int x = width/2;
int y = height/2;
AccelerometerManager accel;
float ax, ay;
CompassManager compass;
float direction;
PImage map;
void setup()
{
accel = new AccelerometerManager(this);
compass = new CompassManager(this);
move = new MapMovement(this);
orientation(PORTRAIT);
size(600,800,P3D);
map = loadImage("map.gif");
imageMode(CENTER);
}
void draw()
{
background(0,0,100);
//For Compass
rotate(direction);
movement.update();
}
//For Accelerometer
public void resume() {
if (accel != null) {
accel.resume();
}
}
public void pause() {
if (accel != null) {
accel.pause();
}
}
public void shakeEvent(float force) {
println("shake : " + force);
}
public void accelerationEvent(float x, float y) {
// println("acceleration: " + x + ", " + y + ", " + z);
I am trying to make a data visualization that displays earthquake data around the world in real-time. Do do this I need the application to reach back to a URL that is a CSV file that gets updated every minute. I have done a bit of looking and digging around but I am not having much luck. How can I tell processing to reach back to read the online CSV file?
I wrote a little program in the standard edition of Processing, and was looking to see if there was a known way to convert it to PHP. I tried to use the "Copy as HTML" so I could work it to PHP (or simply use it as HTML that way) but it would not complete the copy each attempt.
I need to create an overview box for a static image, and I had a few ideas of what I could do but I am very new to Processing and wanted to hear from the community. For this static image, I have created a zoom and pan function, and was thinking about putting a smaller version of the picture in the corner, and having a box with no fill represent the camera parameters, but this seems like something that would yield a lot of small problems and be time consuming. Would anyone have a better idea of how to achieve this?