I am trying to get some parameters into a compiled sketch by running the sketch from the command line and specifying the parameters after the compiled sketch filename. As a start, I used the example from at
http://wiki.processing.org/w/Setting_width/height_dynamically, but I can't seem to make it work.
Here's the sketch (based on above link and a few lines of the setup code that I put):
I have a sketch that spans 2 screens with the size of 3286 x 1080 pixels with following break-outs:
1. Screen 1 : 1920 x 1080 px
2. Screen 2 : 1366 x 768 px
When the app runs, it will display a background that is the same size as the sketch. The sketch would then save a portion of the image into a file. My problem is in the output file, there's a visible blue line which seems to come out of nowhere. Here's my sketch with unrelated code removed:
import processing.opengl.*;
PImage bg;
void setup() {
size(3286, 1080, OPENGL);
frameRate(30);
bg = loadImage("bg.png");
}
void draw() {
background(bg);
PImage noteImg = get(2309, 138, 589, 538);
String filename = "test.png";
noteImg.save(savePath("data/" + filename));
noLoop();
}
Here's the bg image:
And here's the output image:
When I change the rendering mode to other than OPENGL, the blue line is gone. But on my first screen, where images rotates (25 in total), they become laggy.
And also, when using OPENGL mode, the get(x, y, height, width) seems to be off, it gets the area of much lower part of the background which doesn't happen when I use JAVA2D, P2D and P3D.
I am trying to move some elements along the path of an ellipse, something like the following attachment except it's a circle. I grabbed some sketch from another forum the other day (couldn't tracked the old link). Here's the modified sketch from that post:
void setup()
{
size(1024, 768);
textFont(createFont("Arial", 30));
}
void draw()
{
background(0);
stroke(255);
int cx = 500;
int cy = 350;
int r = 300; //radius of the circle
float t = millis()/4000.0f; //increase to slow down the movement
ellipse(cx, cy, 10, 10);
for (int i = 1 ; i <= 12; i++) {
t = t + 100;
int x = (int)(cx + r * cos(t));
int y = (int)(cy + r * sin(t));
text(i, x, y);
}
}
The sketch outputs this:
And what I am trying to achieve is to move the texts along an ellipse path like this:
Any idea how can I achieve the algorithm for this? Thanks!
1. Getting some hand drawn shape using line() function.
2. Show onscreen keyboard using ControlP5 library.
But when I initialize the ControlP5 library, the line drawing doesn't work any longer. Commenting out the ControlP5 part of the code does make the line drawing on again. I've tried setting the setAutoDraw() to false under ControlP5 and draw the button when necessary but no luck.
I downloaded the SQLibrary from
http://bezier.de/processing/libs/sql/, put them in the "libraries" folder and tried to make it work with both Processing 1.09 and 1.5 but to no avail. I visited the the above link again and found that "windows" isn't listed on the tested platform (osx is).
Can anyone confirm that this is the case that windows isn't supported yet?
I have downloaded and been reading Canon EDSDK for the past few days. It's a development kit containing functions for remote controlling the DSLR cameras. As per the title suggests and with my limited knowledge about processing, I would like to know if there's a way to access the said library from Processing? Inside the SDK, there are libraries (EDSDK.lib) and some header files (EDSDK.h, EDSDKErrors.h and EDSDKTypes.h).
If you have some reference about other way of accessing DSLR Camera (mine's is a Canon 500D), please point me to those reference too. Thank you.