hello — i'm still quite a beginner at processing and i hope someone can help me with my problem.
i would like to have a text input, where the letters start to "wander" after a certain time of there being no keyboard input. please try the code below to see what i mean with "wander"...
i've managed to have a fix text, inserted in the text editor, which wanders off in different directions when "enter" is pressed, but i'd like to have the possibility of inserting the text in the display window while the programme is running.
i took the original code from the "strings and drawing text" tutorial and changed it only a little bit.
and is there a way to get the letters to wander off in one specific random direction, like on a straight line and not "wobble" around randomly like they do now?
thank you very much for any help!
here's the code:
PFont f;
String message = "type text here";
// An array of Letter objects
Letter[] letters;
void setup() {
size(1000, 400);
// Load the font
f = loadFont("Arial-Black-48.vlw");
textFont(f);
// Create the array the same size as the String
letters = new Letter[message.length()];
// Initialize Letters at the correct x location
int x = 100;
for (int i = 0; i < message.length(); i++) {
letters[i] = new Letter(x,height/2,message.charAt(i));
hi. i'm still quite a beginner here and have a little question.
i have a code here which draws a random line (thank you amnon.owed for the code!) now i would like it to start at a given point (i've figured that out) and also to end at another given point. suggestions, anybody?
hi – i'm quite new to processing and have come accross a simple problem i'm not able to solve.
i would like to draw a very very simple random tree whereby a random line is drawn, followed by a next random line who's starting coordinates equal the ending coordinates of the last line, so that an endless, jagged line is drawn.
how can i loop the code, so that it always draws a new line linked up to the last line?