Ok, I have a data field that is essentially a 2D data set that can be manipulated in a 3D environment.
The rotateX and Y are manipulated by the accelerometer. rotateZ is manipulated by the compass. The translate X and Y are dictated by GPS inputs, while the Z is manipulated by an altitude input.
My issue is that I have text in this data-field, but it lays flat like everything else. I cannot figure out how to get this test to always be facing the screen while maintaining their positions on the grid. Please let me know if my issue is unclear and I will do my best to go into more detail.
Hello Community! I want to know, is there a way to change the orientation of an axis? I am developing an application that rotates on the Z axis. It currently rotates the entire data field, not a specific object. However, it rotates it from the top left corner of my data-field, and I need to be able to change this rotation location to other parts of the data field in specific number ranges. Can it be done?
Hey all, PeasyCam, as found
here, looks like it could be the answer to some problems I am having in an Android app I am developing in Processing. However, I need help with converting the mousedrag and such to inputs from the accelerometer and compass. Does anyone have any ideas about how this can be done?
Is there a way to do this> I already have the Accelerometer and the Compass hooked into my code as rotateX, Y, and Z. I wanted to create a camera instead of moving the entire data-field, but am having a horrible time trying to connect such a camera to the inputs of a smart phone. Does anything have any ideas that might help me out?
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?