Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

Assign a list of words to a graphic?

$
0
0

Hello,

I'm struggling to come up with a solution for the following problem:

I am creating points at random locations using a for loop.

The number of points created is equal to the number of tweets received like this:

 for (int p=0; p<=numberOfTweets; p++) {
    float x=random(width);
    float y=random(height);
    point(x, y);
  }

Instead of a random (fixed) position, the points will eventually be positioned using noise and will have motion.

The part I am having difficulty with is deciding on the best way to:

Create a new point when a tweet is received

Store the tweet as individual words

Compare the words in the tweet to the words of previously received tweets

Draw a line between points that contain the same word(s)

Kill each point after 1 minute

The idea being something like this (without the text being visible):

So if anyone can suggest the best method(s) for storing words and creating graphics in this way then that would be great!

Thanks


Viewing all articles
Browse latest Browse all 2896

Trending Articles