I wanna develop a program that allows the user to create simple animations drawing each single frame.
To do this, I'd like to show the user the previous frame on the background, so he/she can see it while drawing the new one(in order to draw new one in the correct position -think, for example, to a running man-).
So I have 2 PImage objects,
prev and
cur. The problem shows up when I want to save to current frame: since I'm showing them both, and drawing on the window using common methods such as line, ellipse and so on, I'm not able to save just the
cur frame.
So my question is: is there any way to edit a PImage itself? I would solve the problem if I there would be, for instance, a method "line" that modifies the cur.pixels array without touching the pixels array of the window.
I'm developing an applet using Processing that will display certain data on a map. Since, for now, this data is stored an a CSV(Comma-Separated Values) file, i'd like to know if there is the possibility to pass this file as an argument to the applet when it will be ran on the website.
here's the problem: i wrote an applet which works with maps and draws things on them. It seems to work quite fine, but when I close the applet(using the eclipse applet viewer) I get this exception:
Exception in thread "Animation Thread" javax.media.opengl.GLException: Unable to lock surface
at com.sun.opengl.impl.x11.X11OnscreenGLDrawable.lockSurface(X11OnscreenGLDrawable.java:133)
at com.sun.opengl.impl.x11.X11OnscreenGLContext.makeCurrentImpl(X11OnscreenGLContext.java:61)
at com.sun.opengl.impl.GLContextImpl.makeCurrent(GLContextImpl.java:134)
at processing.opengl.PGraphicsOpenGL.detainContext(Unknown Source)
at codeanticode.glgraphics.GLGraphics.dispose(Unknown Source)
at processing.core.PApplet.dispose(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Thread.java:662)
I can't understand what it is and wasn't able to find anything with google..
I'm trying to create a processing sketch in Eclipse. I've followes the instructions on Processing.org and now i'm able to create simple sketches with Eclipse, but I have some problem with this one.
I've already tried with the Processing IDE and it works fine, but it does not work with Eclipse and I don't know why. The app will be executed on a website, so I want to run it as a Java Applet.
Here's the code:
import processing.core.*;
import processing.opengl.*;
import codeanticode.glgraphics.*;
import de.fhpotsdam.unfolding.*;
import de.fhpotsdam.unfolding.providers.*;
import de.fhpotsdam.unfolding.utils.*;
public class bMapped extends PApplet {
Map mappa;
public void setup(){
size(600, 500, GLConstants.GLGRAPHICS);
smooth();
mappa = new Map(this, new Google.GoogleMapProvider());
Hi everyone, I hope I have choosen the right forum to post in!
I have to write an application based with Processing based on maps(e.g. Google Maps), but I do not know anything about how to interact with them. I will have to draw shapes on the map in certain places based on a function.
Is there a way to communicate with google maps? Where should I start from?
Any help will be appreciate. Sorry for my bad english.