Hi , I have a question related to the worlfram cellular automata that comes with processing in the examples folder.
That program works in this way:
It generates line per line the image going from up to down, when it arrives to the bottom of the sketch it restarts with a new random set of rules.
What i need is to adapt this code to a specific behaivor:
instead of restarting a new ca with new rules when it arrives to the bottom i need that it continue generating the same cellular automata with the same rules. I need that when it arrives to the bottom all the image (background) can move up to the first line in the top of the window and then continue generating the patterns until it arrives again to the bottom and again it moves up the image to the first line and then it continue generating the pattern .... and i need to repeat this process infinitely.
How can i achive this? any idea how to move the background image up?
Hi list, i have a simple program in processing.js where a group of spheres are moving randomly and colliding between them .
For calculating the collision im calculating the distance between all the spheres, the problem is that when i have more than 20 spheres my processing.js app become slow.
I would like to know if there is a way of optimizing the calculation of distance between all the spheres in processing.js
Hi list, I need to ad a pattern of points as background of my processing.js canvas.
I can do it with processing.js for example:
for (int i=0;i< 32; i++){
for (int j=0;j< 56; j++){ point(j * 30, i * 30 ) ;
} }
The problem is that i need to do it inside draw{} and it consumes a lot of cpu, so i was wondering that instead of doing it with code , using a pic with my point pattern as background in my processing.js canvas.
Hi list, im trying to add a processing.js sketch as background into my website.
The problem is that when i add my processing.js it doesnt work as background with all my elements , just with a few.
For example in the following the when i add an image over the processing.js skettch it doesnt appear in front of my processing.js canvas. It appear first the image and in the left it appears the canvas.
Any idea how to solve this problem, how can i make to have my processing.js canvas all the time as canvas with all my elements?
I , i need to load an .obj file in processing and then i need to get the data of the vertices manipulate them and draw back again. I was wondering if there is a library that allows to make this?
If not , which would be the best way of doing this?
Hello, in openframeworks there an addon called ofMesh that allows to load a .obj into a mesh and then i can walk the vertices by iterating over the indices and then get the vertex from that:
getVertex( getIndex( currentIndex + 1 ))
i was wondering if there is something like this avaliable for processing. Is there any library in processing or way of doing this?
Hi, im generating forms on processing and i want to fabricate them using a cnc machine. I been exporting the forms as dxf and objs but when i import them in rhino it interpret the forms as meshes.
I would like to know if there is a way to export a file in a way that rhino can interpret as solid elements or nurbs and not only as meshes. Is it possible?
I been trying to achieve glowing trails but the result im getting is very poor.
Im using opencv to grab some "lighter pixels", then im applying blur and after that im appying additive alpha blending.
But the result im getting is very poor in comparation with that video.
Hi, i was wondering if its possible to convert the data from kinect into 3d objects?
I would like to be able to use the kinect as 3d scanner and convert the space into a 3d model.
Do anybody have tried something like this? Is it possible?
Hi , i need to create a polygon in processing from a picture. The pic is a white shape over a black background, i need to convert that white shape from the pic into a polygon in processing.
I found this example that is very similar from what i need and also you can understand what i need.
Hello, im generating a glowing sphere with pixels. Before i was creating the trail effect creating a rect with alpha channel 1
fill(0, 0, 0, 1 );
rect(0, 0, width , height );
But this doesnt work with pixels[]
How can i replicate this same effect with pixels?
I need that my glowing dot can leave a trail that fade away slowly
thanks
Ball [] cont; float n=0.00f; float q=0.03f; int num=1; float dens; float nnn; int nn;
void setup() { size(700,700); cont=new Ball[num]; for (int index = 0; index < num; index++) { cont[index]=new Ball(10/((25.5f)*(index+1)),100,100,15); }
}
void draw() { background(250); n=n+0.1f; for (int index = 0; index < num; index++){ cont[index].update(); }
loadPixels();
for (int _x = 0; _x < width; _x++) { for (int _y = 0; _y < height; _y++) { dens = 0; for (int res = 0; res <num; res++) { dens +=cont[res].dim/(sqrt(sq(_x - cont[res].bx) + sq(_y - cont[res].by))); } nn=(int)((dens)*(150)); // nnn=50*( noise(_x*q,_y*q,n));
int c=color(nn,(nn)*0.8f,(nn)*0.5f); pixels[_y*width+_x] =c;
} } updatePixels();
}
class Ball { int bx,by; int difX,difY; int dim; float xSpeed,ySpeed,ndelay;
Hello i need to create a blured trail when i move the mouse over the sketch, i would like to have something that looks as a halo or aura or glow of light ,similar to the example from msafluid but withouth the physics. Can anybody point me how to achieve such an effect?
Hello again, in the code i created if i move the mouse very fast it doesnt draw a continous trail , it draws the trail with holes, i would like to know which approaches can i use if i want that my trail can be always continous without depending of the speed i move the mouse?
Hello everybody, im creating simple trail moving a ellipse(with mouse ) over a rectangle with alpha channel .
I have my alpha channel value at 1 but i would like that the fade out of the trail can be even slower. 1 is the lowest value that fill let me use for alpha , if i put 0.9 nothing happens. if I put more than 1 then the fading is faster.
How can i make if i want that the fading out can be slower?
Hi, im trying to run 6 videos at the same time with processing, and it runs very slow, is processing not well suited for this? i tried before with other apps as pd and it runs smooth. would like to know if there is a specific way of running various videos at the same time.