Loading...
Logo
Processing Forum
I drew my name out of lines and shape as follows


  • size(830, 620);
  • strokeWeight(6);
  • smooth();
  • strokeCap(ROUND);
  • strokeJoin(ROUND);
  • //the B
  • rect(50, 120, 1, 200);
  • endShape();
  • arc(51, 270, 110, 110, PI+HALF_PI, TWO_PI+QUARTER_PI+QUARTER_PI);
  • arc(51, 162, 90, 90, PI+HALF_PI, TWO_PI+QUARTER_PI+QUARTER_PI);
  • noFill();
  • // the E
  • arc(185, 260, 120, 120, HALF_PI, HALF_PI+PI);
  • line(125, 260, 185, 260);
  • // the N
  • rect(220, 200, 1, 120);
  • arc(220, 270, 150, 150, PI+HALF_PI, TWO_PI+QUARTER_PI);
  • // the C
  • arc(375, 435, 150, 150, HALF_PI, PI+HALF_PI);
  • // the A
  • triangle(435, 370, 460, 440, 410, 440);
  • line(460, 440, 475, 500);
  • line(410, 440, 390, 500);
  • beginShape();// the K
  • vertex(500, 370);
  • vertex(500, 440);
  • vertex(540, 370);
  • vertex(500, 440);
  • vertex(540, 520);
  • vertex(500, 440);
  • vertex(500, 520);
  • endShape();
  • // the I
  • quad(570, 370, 570.5, 370, 570.5, 520, 570, 520);
  • // the R
  • quad(610, 370, 610.5, 370, 610.5, 520, 610, 520);
  • triangle(610, 370, 610, 450, 660, 410);
  • line(610, 450, 660, 520);


  • Now for a separate project, I want to turn all these things into one individual shape so that i can move it around with the mouse. (which needs to be with ifs)

    Replies(1)

    First, you'll need to move this inside the draw() function...
    Then, it would be easiest to use translate():

    At the beginning of draw():
    Copy code
    1. translate(mouseX, mouseY);

    Of course, you'll need more for drag and drop, but this should give you a start.