Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 06-22-2006, 08:12 AM   #51
krazl
Registered User
 
Join Date: Jun 2006
Posts: 31
Default 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
krazl is offline   Reply With Quote
Old 06-22-2006, 08:42 PM   #52
jsebrech
Joeri Sebrechts
 
Join Date: Apr 2005
Location: Antwerp, Belgium
Posts: 1,465
Default

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.
Attached Files
File Type: zip GraphLayout.zip (15.0 KB, 374 views)
jsebrech is offline   Reply With Quote
Old 06-23-2006, 05:06 AM   #53
soulberry
Registered User
 
Join Date: Feb 2006
Posts: 7
Default

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.
soulberry is offline   Reply With Quote
Old 06-23-2006, 06:50 AM   #54
jsebrech
Joeri Sebrechts
 
Join Date: Apr 2005
Location: Antwerp, Belgium
Posts: 1,465
Default

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).
jsebrech is offline   Reply With Quote
Old 06-27-2006, 06:13 AM   #55
krazl
Registered User
 
Join Date: Jun 2006
Posts: 31
Default 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??
krazl is offline   Reply With Quote
Old 07-05-2006, 09:15 PM   #56
jsebrech
Joeri Sebrechts
 
Join Date: Apr 2005
Location: Antwerp, Belgium
Posts: 1,465
Default

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.
Attached Files
File Type: zip GraphLayout.zip (16.2 KB, 312 views)
jsebrech is offline   Reply With Quote
Old 07-11-2006, 08:26 AM   #57
krazl
Registered User
 
Join Date: Jun 2006
Posts: 31
Default 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..
krazl is offline   Reply With Quote
Old 07-11-2006, 09:07 AM   #58
jsebrech
Joeri Sebrechts
 
Join Date: Apr 2005
Location: Antwerp, Belgium
Posts: 1,465
Default

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
jsebrech is offline   Reply With Quote
Old 07-23-2006, 08:02 PM   #59
jsebrech
Joeri Sebrechts
 
Join Date: Apr 2005
Location: Antwerp, Belgium
Posts: 1,465
Default

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
Attached Files
File Type: zip GraphLayout.zip (18.2 KB, 728 views)
jsebrech is offline   Reply With Quote
Old 07-28-2006, 03:16 AM   #60
krazl
Registered User
 
Join Date: Jun 2006
Posts: 31
Default 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..
krazl is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Optimizing Flash Web Sites for Search Engines rockcoastmedia General Chat 19 03-29-2009 09:31 PM
scrollBar on Flash Exchange cdeg Components 5 05-03-2004 07:13 PM
cant get dynamic txt to link other txtfiles, to display in flash ! munkeydude ActionScript 1.0 (and below) 7 04-18-2004 03:06 PM
Building a Dynamic Weather Maps Flash MX Demo DTNFlashman ActionScript 1.0 (and below) 0 08-22-2003 10:19 AM


All times are GMT. The time now is 12:22 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.