Wednesday, November 25, 2009

progress update

so: we've got our dataset for this now! Last night and this afternoon I wrote a command-line tool in C++ to take the source files from wordnet.princeton.edu and convert it to XML as well as remove a bunch of duplicate words, and words with "_" and "-" in them.
So with that done, I'm now trying to figure out how I can layout data that has a tree structure visually. I've spent tonight relearning trigonometry in the attempt to position child nodes evenly around their parent. I'm on the right track, but not there yet. here's what I have now:
it looks like a total random mess at first, but if you look closer you can see that nodes 1,2, and 3 are in the right position, 4 and 5 are at the right 'x' but need to trade 'y's and 6, 7, and 8 just need to be pushed up, and then they'll be in the right place aswell. This is encouraging, because (i take it to mean) that everything is working right, and something weird is happening in one small piece of code....
incase yo ucan't picture it, here is how the nodes should (but don't) look:


EDIT: so, I believe I said I thought it must be one weird thing in a small piece of code? well, I had the angles being calculated automatically and dynamically, but the drawing function was just written out line by line, and I had updated where it was drawing x values from but not where it was drawing it's y values from, so it for example node 8 has it's proper x but node 3's y. The universe makes sense again...

No comments:

Post a Comment