06-22-2006, 08:12 AM
|
#51
|
|
Registered User
Join Date: Jun 2006
Posts: 31
|
hahah
Quote:
|
Originally Posted by jsebrech
Well, the way I've designed it, once you have the source nodes, you can then put all the nodes on layers, where the source nodes are on layer 1 (top layer), the nodes that are one edge away from it on layer 2, the nodes that are three edges away from it on layer 3, and so on until all nodes have been placed on a layer. Then it's a matter of placing nodes so their direct children on the next layer are below and to the right of them. And then you just draw all the edges in such a way as to not make them overlap.
I didn't get to post my code. Blame the girlfriend 
|
i think you should put aside ur girl..hehehhe just kidding..let see what could i produce..hmm
|
|
|
06-22-2006, 08:42 PM
|
#52
|
|
Joeri Sebrechts
Join Date: Apr 2005
Location: Antwerp, Belgium
Posts: 1,465
|
Here's what I have so far. It has gotten to the point where I have laid out all the nodes in the appropriate rows / columns. Now all that's left is to draw the edges. The section of the algorithm explanation about the edges is not correct, because it would draw an unnecessary amount of bends in some cases (even though no overlapping of edges should occur). I intend to rework it. Also, the way it finds sources does not guarantee that the entire graph will be rendered, if the graph contains loops, so I need to improve on that also. Nothing of the layout is visible on the screen yet though (and I still need to wrap the whole thing in a scrollable view).
I'll keep working on it, it's an interesting project to amuse yourself with.
Oh, by the way, it's a flash 8 project, so if you don't have that, just say so and I'll resave as flash mx 2004, because I'm not using any flash 8 features.
|
|
|
06-23-2006, 05:06 AM
|
#53
|
|
Registered User
Join Date: Feb 2006
Posts: 7
|
To create a Node network with communication between designated nodes, it might be worthwhile to have a look at ceratin creations from
http://www.levitated.net
If you go to the selection according to "categories", under "artificial life", you'll find downloadable open source experiments for study - Randomly Connected Binary network versions 1 & 2. You might want to study the "network evolution" too under another category down the list and the node studies further on.
I hope they help.
|
|
|
06-23-2006, 06:50 AM
|
#54
|
|
Joeri Sebrechts
Join Date: Apr 2005
Location: Antwerp, Belgium
Posts: 1,465
|
I doubt that actionscript is fast enough for evolutionary construction of the graph's layout (for example, using spring-based graph layout algorithms, which turn edges into springs that pull nodes together and nodes into repulsors that refuse to be pulled together).
|
|
|
06-27-2006, 06:13 AM
|
#55
|
|
Registered User
Join Date: Jun 2006
Posts: 31
|
think
if i could solve the position of the node(without overlap both node and edge), i think it will solve graph problem..
p/s: any co-ordinate expert??
|
|
|
07-05-2006, 09:15 PM
|
#56
|
|
Joeri Sebrechts
Join Date: Apr 2005
Location: Antwerp, Belgium
Posts: 1,465
|
I worked some more on it, now the nodes are positioned correctly on the screen. All that's left is reworking the algorithm to draw the edges (i have some ideas), and then draw them.
|
|
|
07-11-2006, 08:26 AM
|
#57
|
|
Registered User
Join Date: Jun 2006
Posts: 31
|
more complicated
Quote:
|
Originally Posted by jsebrech
I worked some more on it, now the nodes are positioned correctly on the screen. All that's left is reworking the algorithm to draw the edges (i have some ideas), and then draw them.
|
it's become more complicated to understand now. if there's a line between connected nodes, maybe it's clearer for me..
|
|
|
07-11-2006, 09:07 AM
|
#58
|
|
Joeri Sebrechts
Join Date: Apr 2005
Location: Antwerp, Belgium
Posts: 1,465
|
Well, it's there apart from the lines. If you take a screenshot and draw the lines yourself on top of the positioned nodes you'll see what I mean. There is still a bug in the node positioning though (which I didn't realize until I posted the last version). Probably this week I will find time again to work some more on it. But first I need to fill out my tax forms
|
|
|
07-23-2006, 08:02 PM
|
#59
|
|
Joeri Sebrechts
Join Date: Apr 2005
Location: Antwerp, Belgium
Posts: 1,465
|
OK, it's done. One bug left over: the source nodes are not always found. But I'll leave fixing that as an exercise for the reader  The code is messy, but reasonably well documented, so I don't intend to go in and remodel it to be cleaner unless I need it myself for something.
It should be able to lay out pretty much any directed graph, and do it without wasting too much space or crossing edges in such a way as to make it impossible to see which edge goes where. I must say it was an entertaining programming challenge, so much obliged krazl for the inspiration.
Enjoy
|
|
|
07-28-2006, 03:16 AM
|
#60
|
|
Registered User
Join Date: Jun 2006
Posts: 31
|
wow
Quote:
|
Originally Posted by jsebrech
OK, it's done. One bug left over: the source nodes are not always found. But I'll leave fixing that as an exercise for the reader  The code is messy, but reasonably well documented, so I don't intend to go in and remodel it to be cleaner unless I need it myself for something.
It should be able to lay out pretty much any directed graph, and do it without wasting too much space or crossing edges in such a way as to make it impossible to see which edge goes where. I must say it was an entertaining programming challenge, so much obliged krazl for the inspiration.
Enjoy 
|
you're the man!!...cool man...this will be reference in future. if i could do some arrangement..maybe i could overcome the cross line..
|
|
|
| Thread Tools |
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT. The time now is 11:51 AM.
///
|
|