• fullscreen
  • Type05_greenQ.pde
  • import geomerative.*;
    //import processing.opengl.*;
    
    // Declare the objects we are going to use, so that they are accesible from setup() and from draw()
    RFont f;
    RShape grp;
    RPoint[] points;
    
    void setup(){
      // Initilaize the sketch
      size(600,400);
      frameRate(24);
    
      // Choice of colors
      background(255);
      fill(255,102,0);
      stroke(0);
      
      // VERY IMPORTANT: Allways initialize the library in the setup
      RG.init(this);
      
      //  Load the font file we want to use (the file must be in the data folder in the sketch floder), with the size 60 and the alignment CENTER
      grp = RG.getText("Q", "FreeSans.ttf", 372, CENTER);
    
      // Enable smoothing
      smooth();
    }
    
    void draw(){
      // Clean frame
      fill(256,256,256,25);
      rect(0,0,width, height);
      
      // Set the origin to draw in the middle of the sketch
      translate(width/2, 3*height/4);
      
      // Draw the group of shapes
      noFill();
      stroke(0,0,200,150);
      RG.setPolygonizer(RG.ADAPTATIVE);
     // grp.draw();
      
      // Get the points on the curve's shape
      //RG.setPolygonizer(RG.UNIFORMSTEP);
      //RG.setPolygonizerStep(map(float(mouseY), 0.0, float(height), 0.0, 1.0));
      
      RG.setPolygonizer(RG.UNIFORMLENGTH);
      RG.setPolygonizerLength(map(mouseX, 0, height, 3, 500));
      points = grp.getPoints();
      
      // If there are any points
      if(points != null){
        noFill();
        stroke(0,130,0,110);
        strokeWeight(0.3);
        beginShape();
        for(int i=0; i<points.length; i++){
          vertex(points[i].x, points[i].y);
        }
        endShape();
      
        fill(45);
        stroke(0);
        for(int i=0; i<points.length; i++){
          //ellipse(points[i].x, points[i].y,1,1);  
        }
      }
    }
    

    code

    tweaks (0)

    about this sketch

    This sketch is running as Java applet, exported from Processing.

    license

    advertisement

    Kavita

    Type Green Q

    Add to Faves Me Likey@!
    You must login/register to add this sketch to your favorites.

    Experimental typography using the geomerative library.

    You need to login/register to comment.