Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
joora8
joora8's Profile
10
Posts
30
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
controlP5: controlEvent() problem with the new version
[4 Replies]
06-Oct-2010 08:05 AM
Forum:
Contributed Library Questions
Hi all!
I used to use an old controlP5 version whith some bugs I needed they to be fixed.
In the actual one (5.0.4), those bugs are fixed. So i'd like to use this one.
BUT I get troubles with it:
I have in my code (in the class Main which extends PApplet):
void controlEvent(ControlEvent theEvent) {
...
}
This causes this error:
6 oct. 2010 16:56:32 controlP5.ControllerPlug set
ATTENTION: plug() failed.java.lang.NoSuchMethodException: main.Main.controlEvent(controlP5.ControlEvent)
If I remove all the function, no problem.
If I remove the argument (ControlEvent theEvent): Illegal argument exception.
Help please!
How to get automatically the photo I've juste token: Camera>USB>Computer?
[2 Replies]
29-Sep-2010 11:04 AM
Forum:
General Discussion
Hi!
I have an unusal question...
A'd like to know how to acquire a photo from a camera using USB.
In this way:
1) I take a picture (the camera is connected to my computer).
2) The photo is sended to the computer and used by my program.
And this WITHOUT any waste of time between 1 & 2.
How can it be possible?
ControlP5 Range: bug? problem when changing maxValue
[0 Replies]
26-Sep-2010 02:02 PM
Forum:
Contributed Library Questions
Hello,
I have a problem with RANGE of ControlP5:
1) I create a new Range, width 500, max=10.0, mavValue=10.0.
>> OK.
like this: [####################]
2) I change max to 100.0 (range.setMax(100.0); range.setHighValue(100);)
>> Now the foreground of the range is displayed 10x bigger (5000px) (but the 'width' keep the same).
like that: [####################]##############################################################...
Same problem if I change to a lower value, it's smaller.
It is a known bug? Did I forget something?
Can I fix it?
EDIT: YES it was a bug, fixed in the last version of ControlP5 (0.5.4).
Problem using save()
[3 Replies]
17-Sep-2010 07:13 AM
Forum:
Programming Questions
Hello all,
I can't find why, I create a PGraphics, I draw things on it, and when I use the save() function,
the colors are denatured, there is a blue halo...
EDIT: ONLY IF .JPG, png is ok.
but in the screen the PGraphics is ok.
From where could come the problem?
Here is an outpout example :
(I removed the head of the man before, there is no white in the outpout image)
Sign an applet from Windows?
[0 Replies]
02-Sep-2010 07:06 AM
Forum:
Integration and Hardware
Hi,
I found a lot of docs saying "type keytool xxxxxxxxx and
jarsigner ..."
(for example,
http://wiki.processing.org/w/Sign_an_Applet
: thanxs to forget that Windows exists too!)
Nowhere I can found a link to download "jarsigner".
SO, please help windows users :
could someone explain the steps to sign a jar file under Windows?
thx
edit: I fond that jarsigner & keytool are (for me) inside C:\Program Files\Java\jdk1.6.0_21\bin
I had to add this path to the path env variable to be able to use it with cmd.
So, the first steps are:
1) find the JDK folder (install it if you don't have)
2) change the windows environnement variable named "path" to ad the "bin" folder of jdk :
- Right click on "computer"
- System > Advanced (Advanced system parameters in Seven)
- Environnement variables
- Select "Path" in the second list and click on "Modify"
- add a semicolon (;) at the end and paste the url (for me: C:\Program Files\Java\jdk1.6.0_21\bin\)
3) The next time you'll use "cmd", you'll able to use "keytool" and "jarsigner"
Then, you can use them (I don't know how) or use this software:
http://www.javafr.com/codes/JARSIGNER-SIGNEZ-VOS-ARCHIVES-RIEN-TEMPS_41972.aspx
Movie.init() or new Movie()?
[1 Reply]
30-Aug-2010 03:20 PM
Forum:
Core Library Questions
Hi!
In my program, I see that when I create a Movie, (m=new Movie(...))
while I don't close it using m.dispose(), the program is slow.
As I just need to read the video a few times, I guess I have to open and dispose the movie each time.
But I wondered what is the best to reopen the Movie (the same movie each time) :
m = new Movie(...) OR m.init(...) ? (or something better?)
And I don't know what args needs init...
I need the fastest way :)
thx!
unaccurate rotation! What can I do?
[5 Replies]
22-Aug-2010 10:59 AM
Forum:
Programming Questions
Hi!
I have a serious problem of rotation around a point :
It works but it is not enough accurate
I have this:
public /*abstract*/ class Renderable {
// variables
protected float w,h, cx,cy;
protected int rot;
public Renderable() {
cx=cy=0;
w=200;
h=100;
}
public void translate(float x, float y){
this.cx += x;
this.cy += y;
}
public void drawDecorationOn(PGraphics pg){
pg.pushMatrix();
pg.translate(cx, cy);
pg.rotate((float) (rot*PApplet.PI/180.));
pg.rect(-w/2, -h/2, w, h);
pg.popMatrix();
}
public void rotateDeg(int deg){
this.rot += deg;
}
public void rotateRad(double rad){
rotateDeg((int)(rad*180./PApplet.PI));
}
public void rotateDeg(int deg, float pivotX, float pivotY){
rotateRad((double)deg*PApplet.PI/180., pivotX, pivotY);
}
public void rotateRad(double rad, float pivotX, float pivotY){
this.cx = (float) ( Math.cos(rad)*(this.cx-pivotX) - Math.sin(rad)*(this.cy-pivotY) + pivotX);
this.cy = (float) ( Math.sin(rad)*(this.cx-pivotX) + Math.cos(rad)*(this.cy-pivotY) + pivotY);
rotateRad(rad);
}
}
But if I rotate around a point several times, it does a "spiral" instead of a "circle"...
(the distance between the point become smaller or bigger, depending on the angle).
As example, this code (30 degrees):
public class Main extends PApplet {
Renderable r;
public void setup() {
size(570, 650);
background(0);
r = new Renderable();
r.translate(200, 300);
r.rotateDeg(30);
}
public void draw() {
stroke(255);
noFill();
r.drawDecorationOn(g);
r.rotateDeg(30, 300f, 300f);
}
}
does
and with 91 degrees :
What's the problem?
How can I obtain a correct accuracy?
rotate() and smooth() : how to smooth the border of what is rotated?
[7 Replies]
12-Aug-2010 02:46 PM
Forum:
Programming Questions
Hello!
I really appreciate the smooth() function!
But I was afraid to see that when you use the rotate() func,
the rotation is smoothed but not the edges of the rect which is drawn!
ex: the border of the image is not smoothed.
// with:
PImage img = loadImage("animage.jpg");
smooth();
draw(){
translate(100,100);
rotate(0.5);
image(img,0,0);
}
How to fix that?
Is it possible to load PNG with alpha?
[2 Replies]
12-Aug-2010 02:39 PM
Forum:
Programming Questions
Hi!
This question is light but I didn't manage to find the answer by searching by myself :(
I just want to load PNG with its transparency...
Is there a way to do it?
With loadImage: no alpha...
I know the mask() function but anyway it needs to be able to read the alpha channel first...
help? :)
How to make images from a video
[6 Replies]
05-Aug-2010 10:28 AM
Forum:
Contributed Library Questions
Hi.
I'm using the video library (QT).
I want to extract some frames from the video and convert them to PImage.
I have a
Movie
m
, that I read() after a jump().
I also have
PImage[]
img
;
I tried:
imgs[i] = m;
but if I display it in the draw() function, it reads the movie...
this is not correct:
imgs[i] = new PImage(m);
So my question is simple:
how to get a still PImage distinct from the movie?
thanks!
«Prev
Next »
Moderate user : joora8
Forum