Last active
November 24, 2015 18:47
-
-
Save getflourish/78a2654ab95b8eac6951 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import geomerative.*; | |
import org.apache.batik.svggen.font.table.*; | |
import org.apache.batik.svggen.font.*; | |
RFont font; | |
RGroup grp; | |
RPoint[] points; | |
void setup () { | |
size( 800, 600); | |
RG.init(this); | |
font = new RFont("Alegreya-Regular.ttf", 72, RFont.CENTER); | |
grp = font.toGroup("Hello World"); | |
RCommand.setSegmentLength(5); | |
RCommand.setSegmentator(RCommand.UNIFORMLENGTH); | |
points = grp.getPoints(); | |
} | |
void draw() { | |
background(0); | |
for (int i = 0; i < points.length; i++) { | |
float targetX = mouseX + points[i].x; | |
float targetY = mouseY + points[i].y; | |
ellipse(targetX, targetY, 2, 2); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment