Yep, I'll have to work a bit on the doc and the implementation of the getPoints etc. methods to make them behave equally.
The points these methods return are (or at least should be) always new points and not the actual points of the shape.
The solution to your problem is to create a new shape using those modified points.
So I have added a method to the lib to make this easy: RG.createShape(RPoint[][] points)
NOTE: You will need revision 24 of geomerative at http://www.ricardmarxer.com/geomerative
Furthermore since you want to maintain the hierarchy of the shapes (the holes) you will need to use getPointsInPaths() instead of getPoints()
Here is the corrected sketch:
Code:
import geomerative.*;
RFont f;
RShape grp;
RPoint[][] pathPoints;
void setup() {
size(800,600);
frameRate(25);
smooth();
RG.init(this);
grp = RG.getText("lakögfaty", "MYRAIDPS.TTF", 70, CENTER);
}
void draw() {
translate(width/2,height/2);
noStroke();
fill(0);
background(255);
//grp.draw();
RG.setPolygonizer(RG.UNIFORMLENGTH);
pathPoints = grp.getPointsInPaths();
for (int j = 0; j < pathPoints.length; j++){
RPoint[] points = pathPoints[j];
for (int i = 0; i < points.length; i++){
int move = mouseY-height/2;
if (points[i].y < -50){
fill(0,0,255);
points[i].y = points[i].y + move;
}
else if (points[i].y > 5){
fill(255,0,0);
points[i].y = points[i].y - move;
}
ellipseMode(CENTER);
ellipse(points[i].x,points[i].y,2,2);
}
}
stroke(0);
RShape newshp = RG.createShape( pathPoints );
RG.shape( newshp );
}
I have modified a bit the sketch to make it work in a way I understand it better. By the way I like the idea a lot!!