We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi people, how are you?
I'm André, I'm a jewelry designer and I'm in a project that I think Processing could help, but I'm just a beginner...
I want create a mesh of curves (with a spiral curve that I already draw), that I can control with ControlP5 - like: generate more curves or less, get them closely or separated... every curves are like the one that I have, just scaled, rotated and mirrored (randomly)...
do anyone know how to help me?
ex:
(note that they can be anywere, don't need to be like image)
code of my curve (bezier)
//André Rocha - ansiro@gmx.com
//----------anchor points
float a1x, a1y;
float a2x, a2y;
float a3x, a3y;
float a4x, a4y;
float a5x, a5y;
float a6x, a6y;
float a7x, a7y;
float a8x, a8y;
//-------------control points
float c1x, c1y;
float c2x, c2y;
float c3x, c3y;
float c4x, c4y;
float c5x, c5y;
float c6x, c6y;
float c7x, c7y;
float c8x, c8y;
float c9x, c9y;
float c10x, c10y;
float c11x, c11y;
float c12x, c12y;
float c13x, c13y;
float c14x, c14y;
void setup() {
size(500,500);
background (255);
//-------------archor and control points coordinates
a1x = 287;
a1y = 153;
a2x = 219;
a2y = 200;
a3x = 284;
a3y = 241;
a4x = 360;
a4y = 159;
a5x = 280;
a5y = 51;
a6x = 132;
a6y = 128;
a7x = 130;
a7y = 304;
a8x = 310;
a8y = 449;
//----//
c1x = 249;
c1y = 131;
c2x = 211;
c2y = 167;
c3x = 226;
c3y = 233;
c4x = 251;
c4y = 243;
c5x = 317;
c5y = 239;
c6x = 360;
c6y = 202;
c7x = 360;
c7y = 117;
c8x = 346;
c8y = 72;
c9x = 213;
c9y = 31;
c10x = 152;
c10y = 85;
c11x = 111;
c11y = 171;
c12x = 97;
c12y = 228;
c13x = 163;
c13y = 381;
c14x = 230;
c14y = 440;
}
void draw() {
noFill();
stroke(0);
smooth();
bezier(a1x, a1y, c1x, c1y, c2x, c2y, a2x, a2y);
bezier(a2x, a2y, c3x, c3y, c4x, c4y, a3x, a3y);
bezier(a3x, a3y, c5x, c5y, c6x, c6y, a4x, a4y);
bezier(a4x, a4y, c7x, c7y, c8x, c8y, a5x, a5y);
bezier(a5x, a5y, c9x, c9y, c10x, c10y, a6x, a6y);
bezier(a6x, a6y, c11x, c11y, c12x, c12y, a7x, a7y);
bezier(a7x, a7y, c13x, c13y, c14x, c14y, a8x, a8y);
}