Here it goes.
I have been thinking about this for a long time, and havent really been able to put up a proper way to do it yet. I havent implemented anything yet, as im still designing the thing.
The idea is that i crawl a website for internal links, i got this settled, its easy, but after the crawling, i end up with an array with lots of links, and how many times those particular link appears on the site that i crawled (and how they're connected).
With this huge array, i want to draw a graph somehow. Assuming i can handle the data correctly, the real question here is how i can draw this in a image 开发者_运维百科by the use of the GD library.
I figured if theres less than 12 elements, i can align them up on a unit circle spacing them up as a circle and then connecting them accordingly, so anything up to 12 elements shouldn't be a problem, but if theres more than 12, it could be awesome getting them lined up like this http://nayena.com/stackoverflow/graph.png Or well, thats just a rough drawing, but i guess its just to prove a point.
So i'm here looking for guidance or tips towards getting the math down to getting the stuff lined up in a good way.
I have previously made bar-graphs, so i have little experience doing math with GD. If possible, id prefer not using some plotter-library - in the end, it gives me a better understanding on how things are supposed to be.
This is a whole subfield of CS/IS, with textbooks, research papers and symposia devoted to the subject of graph drawing.
- GraphDrawing.org
- Graph Drawing: Algorithms for the Visualization of Graphs
- Graph Drawing Software (Mathematics and Visualization)
- Drawing Graphs: Methods and Models (Lecture Notes in Computer Science)
- http://vis.computer.org/
You could devote an entire career to how to plot a graph.
精彩评论