Hello, I have moving points on an Arabic letter outline (but you can try it using any letter from any font) , and basically I want to create hairlike strokes on the points, where they grow out (similar to sketches in the image), can anyone help me? I’m pretty new to programming too so excuse my code. Also I am using geomerative library.
Thank you!!!
import geomerative.*;
// 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,600);
frameRate(30);
// Choice of colors
background(255);
fill(255,102,0);
stroke(0);
RG.init(this);
// Load the font file we want to use
grp = RG.getText("ج", "Mishafi.ttf", 672, CENTER);
smooth();
}
void draw(){
background(255);
translate(width/2, height/2);
// 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.UNIFORMLENGTH);
RG.setPolygonizerLength(map(frameCount, 0, height, 3, 200));
points = grp.getPoints();
// If there are any points
if(points != null){
noFill();
stroke(0,200,0);
beginShape();
for(int i=0; i<points.length; i++){
vertex(points[i].x, points[i].y);
endShape();
}
fill(0);
stroke(0);
for(int i=0; i<points.length; i++){
ellipse(points[i].x, points[i].y,1,1);
}
}
}