I am trying to create a closed shape with spline curve, however my spline curve is always a open one(see below), does anyone know how can I create a closed one? the starting point and the end point should be the same one.
I just tried the
NyArtoolkitlibrary for processing, which involved GSVideo as well, however, when I tried to run the second sketch of this tutorial, I got the error that "error when detecting player, maybe some native resource is already disposed"
anyone encountered this before or has any idea how can I do with that? tried google but not much useful info..
I am now trying to test the mpe library from daniel schiffman with processing,
I got the library but i dont know if i have the correct mpeServer.jar. I tried to run that with windows CMD, however it couldnt work and gave me "invalid or corrupt javafile mpeServer.jar"
I tried that on two computers, same issue.
does anyone know what's wrong here? do i need to install anything more? i already have the newest version of JRE.
I'm now working on how to communicate arduino with processing in both way. means the processing can read value from arduino to trigger certain animation, and the arduino can trigger some events ( like led on) when the animation runs in a certain point.
I wrote two quick sketches in arduino and processing. it is a snake goes from left to the right side of the screen. when it hits the right side, it will stop, and the led of arduino will be on for a certain period (3 seconds). after that, the snake goes from left to right again, and the led should be off for the next round.
the problem of my sketch is, the led will light up once, but never turns off again. i tried everything I could yet it still wont work.
does anyone have the similar problem or can anyone help me out ?
====================this is code in arduino=================
void setup()
{
Serial.begin(9600);
pinMode(13, OUTPUT);
}
void loop() {
int check;
if (Serial.available()>0) {
check = Serial.read();
if(check == '0') {
digitalWrite(13, HIGH);
delay(3000);
Serial.write('1');
} else {
digitalWrite(13, LOW);
Serial.write('0');
}
}
}
====================this is code in processing=================
import processing.opengl.*;
import processing.serial.*;
Serial myPort;
int signal;
Mover[] mover;
int nummover = 7;
int sta;
void setup() {
frameRate(30);
size(1000,1000,OPENGL);
smooth();
background(0);
println(Serial.list());
myPort = new Serial(this, Serial.list()[0], 9600);