We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexDiscussionExhibition › Text Universe
Page Index Toggle Pages: 1
Text Universe (Read 5387 times)
Text Universe
Jun 11th, 2010, 4:05am
 
Hi all,

I just put my first sketch on OpenProcessing. Scary stuff!

But it seems to work. Even in P3D. Please have a look at the Text Universe. It splits any given text into a 3d structure, given that a (reasonably small) text consists of paragraphs, and a paragraph consists of sentences, a sentence is made out of words. And a word--of letters.

...

I'm really interested in pointers on how I could've done things smarter, so please also look through the code.

Cheers
Re: Text Universe
Reply #1 - Jun 11th, 2010, 5:59am
 
Nicely done!
The idea is interesting and the result is convincing.
Re: Text Universe
Reply #2 - Jun 11th, 2010, 7:19am
 
Cool - what did you use for the spring graph layout?  Traer?
Re: Text Universe
Reply #3 - Jun 11th, 2010, 8:06am
 
Thanks!
But no, no physics involved this time. Good old math.  Smiley

I rewrote the second spiral function, using the golden ratio I found here.
Re: Text Universe
Reply #4 - Jun 11th, 2010, 8:09am
 
cool, i like it...
Re: Text Universe
Reply #5 - Jun 11th, 2010, 10:31am
 
Pretty cool.  Smiley

It is a bit hard to read, though. It would be good if the text was outlined or on a background, and/or rendered afterwards as an overlay so you could pick it out better.
Re: Text Universe
Reply #6 - Jun 11th, 2010, 11:03am
 
i also thought its maybe a bit dense and would be easier to read of you would spread it... maybe make those lines, semitransparent too
Re: Text Universe
Reply #7 - Jun 11th, 2010, 12:10pm
 
Hey, thanks for the suggestions. Indeed I was planning to create an overlay too, for real informative purposes. In this sketch I only thought of the text as decorative, to illustrate the concept. I wasn't really expecting people to read a book this way..  
Smiley

The length of lines could really use a more intelligent approach. An object with a lot of children should sprout longer lines. But then it parent should increase the length his "line" (radius) too in order not to get constricted with its children... eh...

Cedric: I actually have problems with alpha/opacity in opengl. Could you explain how to get correct alpha behavior in 3D?
Re: Text Universe
Reply #8 - Jun 11th, 2010, 12:20pm
 
It doesn't appear that your using OpenGL in that sketch.  3D should be the same as 2D for the alpha.  Just use all four values R/G/B/A
Code:
color scolor = color(255,255,255,128);  //semi-transparent white
stroke(scolor);
line(0,0,0, children[i].x, children[i].y, children[i].z);


You may also want to disable the doubleclick reset on the peasycam.
Code:
cam.setResetOnDoubleClick(false); 

Re: Text Universe
Reply #9 - Jun 11th, 2010, 1:03pm
 
there shouldnt be any problem with alpha in opengl.
if you use stroke(0,100); instead of stroke(0);
it actually should work.
Re: Text Universe
Reply #10 - Jun 11th, 2010, 1:48pm
 
Haha hey jeff, I know. OPENGL is disabled on OpenProcessing, so I commented out the opengl libs to publish it there. I'd recommend to change the renderer once you run the sketch from the IDE.

Also, I'm familiar with the basics of alpha. I only had major problems when applying them in the traditional way to opengl. Much like problems of smooth() in P3D, it seems like it doesn't actually make the lines transparent, but instead calculates their color based on the initial perspective. Stuff looks good, until you rotate the scene, and opaque lines in the color of the background obscure the scene. In the example of this sketch it isn't really easy to see, but I just tested it with alpha set to 100; zoomed all the way out you can see a difference in the appearance of the lines from different angles.

I'll try to setup a better example & post it to the opengl section of this forum.
Re: Text Universe
Reply #11 - Jun 11th, 2010, 2:22pm
 
Opened a topic to continue discussion of alpha in OpenGL here.
Re: Text Universe
Reply #12 - Jun 14th, 2010, 3:43pm
 
Great project! Congrats!!!
Re: Text Universe
Reply #13 - Jun 17th, 2010, 3:00am
 
Great Ideas ,Thanks to share posts.Work At Home On the Internet  
Page Index Toggle Pages: 1