Hi! I'm working on converting a simple sketch to utilize Geomerative to render graphics, instead of the built-in Processing functions, but have hit a little snag. Its easy enough to draw lines and shapes using Geomerative, but I'm struggling with drawing curves.
The original code I'm using uses the curveVertex method nested inside a pair of beginShape/endShape calls, but Geomerative utilizes bezier curves, which require explicit definition of control points. Here is the relevant snippet from my sketch that I'm having a hard time porting over to Geomerative:
- curveVertex(points[points.length-1].x * sscaler, points[points.length-1].y * sscaler);
- for (int t = 0; t < points.length; t++) {
- curveVertex(points[t].x * sscaler, points[t].y * sscaler);
- }
- curveVertex(points[0].x * sscaler, points[0].y * sscaler);
Any ideas on replicating the effects using bezier curves, rather than the curveVertex method?
1