The Engineer's Place for News and Discussion®

 Previous in Forum: Good Vibrations Next in Forum: Damping Ratio Measurement of a Spring

### Subscribe to Discussion:

CR4 allows you to "subscribe" to a discussion
so that you can be notified of new comments to
the discussion via email.

Anonymous Poster

### Edge Routing in Graph Drawing

08/21/2006 11:30 AM

Giuseppe writes:
Hi, I'm a student of a university of Milan and I have a problem:
I'm working for an application that have to make the edge routing. For example, I have some vertex and they are connected with the edges so I have to become it more readable. Can you help me? I'm searching some routing example but I don't find anything...I found documents about Orthogonal and Hierarchical Layout...but I don't find any algorithm for the edge routing.

Thanks
Kind Regards

Interested in this topic? By joining CR4 you can "subscribe" to
Associate

Join Date: May 2006
Location: Corenda, Situmekar, Cisitu, Sumedang, West Java, Indonesia, Asia, Earth, Solar System, Milky Way, Universe.
Posts: 42
#1

### Edge routing - false color algorithm

08/22/2006 2:29 AM

Whatever the algorithm is, whether or not it meets your requirement, but let me tell my trick to find the edge of object on the monitor.

Using a ready made application indeed a better way, but using your own algorithm is the best way for your brain and man kind. :-)

It was assumed that:
1. The object has solid color (no gradation)
2. The circumference has also solid but different color with the object.
3. The object and circumference being in a frame of rectangular shape on the monitor screen.
4. You want a line (or curve) that is a border for the object in whatever color you want. Let white is the color of the line. (The object and the circumference is not white, of course)

Here is the algorithm in simplest:
A. Horizontal Scanning
1. Do scan pixel by pixel in row and read its color
2. put the white dot when the pixel color changes
3. repeat the process for all the row

B. Vertical Scanning
1. Do scan pixel by pixel in column and read its color
2. put the white dot when the pixel color changes
3. repeat the process for all the column

The proces should superimposed for both the scanning proccess.