Reply to Re: How to visualize network

Your name:

Reply:


Posted by Rik Wasmus on 01/20/08 12:29

On Sun, 20 Jan 2008 03:12:44 +0100, The Natural Philosopher <a@b.c> wrot=
e:
> itschy wrote:
>> On 19 Jan., 20:57, The Natural Philosopher <a...@b.c> wrote:
>>> itschy wrote:
>>>> On 19 Jan., 17:19, The Natural Philosopher <a...@b.c> wrote:
>>>>> itschy wrote:
>>>>>> On 18 Jan., 23:31, Jensen Somers <jensen.som...@gmail.com> wrote:=

>>>>>>> PHP has support to create images, so my guess is - if I understa=
nd =

>>>>>>> the
>>>>>>> problem correctly - you'll just need to find a way to draw dots =
and
>>>>>>> lines, making them thicker depending on the weight they have.
>>>>>> Not quite.
>>>>>> You missed the part, where I mentiond that I do not have any
>>>>>> coordinates of the nodes. Thus I'cant just draw them, cause I don=
't
>>>>>> know where. :)
>>>>>> What I seek is some solution, which finds a representation accord=
ing
>>>>>> to the information I have about the edges (that is, connected or =
=

>>>>>> not,
>>>>>> and if, what weight/line length do they have).
>>>>>> E.g.:
>>>>>> I have three nodes A,B,C and 3 connections a(A,B,3), b(B,C,4), =

>>>>>> c(A,C,
>>>>>> 5) (each with infos about from_node, to_node and weight/length.
>>>>>> In this szenario, there are only two possible ways to draw that
>>>>>> network correctly:
>>>>>> 5
>>>>>> A-----C B
>>>>>> 3\ /4 3/ \4
>>>>>> B A-----C
>>>>>> 5
>>>>>> And their rotations.
>>>>>> I try to find some tool/algorithm which is able to do this (and d=
raw
>>>>>> it) in php.
>>>>>> Tough luck I guess... :(
>>>>>> itschy
>>>>> Didn't they teach you basic geometry at school?
>>>>> three nodes with three paths, defines a unique shape, which is =

>>>>> constant.
>>>>> It can be rotated and mirrored,without violating the original
>>>>> definition, but the shape remains constant.
>>>>> To plot it, simply assume one point (A) is at 0,0, the next one -=
=

>>>>> say
>>>>> 'B' is at the correct distance along the X axis, so in your case i=
ts
>>>>> co-ordinates are 3,0.
>>>>> Solving the position of the third point C involves solving a pair =
of
>>>>> simultaneous quadratic equations. Cf Pythagoras and the dropping o=
f
>>>>> perpendiculars.
>>>>> Namely:-
>>>>> Cx^2+Cy^2=3D(5)^2
>>>>> (3-Cx)^2 +Cy^2=3D(4)^2
>>>>> Now there are either two, or none, solutions for Cy as there alway=
s =

>>>>> are
>>>>> for quadratics. One solution is the mirror of the other.
>>>>> Now go solve it.
>>>>> Its your homework, not mine.
>>>> Thanks for teaching me.
>>>> Now, have you read anything I wrote?
>>>> In short words i will summarize:
>>>> 0. They did not only teach me basic geometry in school, but also
>>>> analytical geometry, graph theory and such in university.
>>>> 1. I try to find an EXISTING solution not write my own.
>>>> 2. Jensen Somers misunderstood my initial post, so I clarified, wha=
t
>>>> kind of solution I seek. I described to him exactly what you did to=
me
>>>> (in a visual way).
>>>> 3. I know well how to do it, I wanted to know if it was done before=

>>>> (because with all the drwaing stuff it is not worth it to implement=
it
>>>> by myself)
>>>> 4. Your answer is still welcome, maybe someone searching and findin=
g
>>>> this thread can use it. but next time please don't assume everyone
>>>> else is stupid! :)
>>> I don't assume. I go on the evidence.
>>>
>>> Maths packages exist.
>>> Graphics packages exists.
>>> The mathematics of quadratics is well known.
>>>
>>> So all it needs s an unstupid unlazy person to put them all together=
..
>>>
>>> Php doesn't have a package to calculate the net loss in weight of a
>>> rutting elephant after sex, either.
>>>
>>> If you want soenmthing that obscure, write it.
>> So, the answer to my question would be:
>> "No, it doesn't exist"
>
> The astounding question I have, is whatever made you think it would?
>
> I can't think of a single application for such a program.

Euhm, this one for instance: =

http://www.php.net/~helly/php/ext/spl/classCachingRecursiveIterator.html=
=

Nice extends/implements visualisations, allthough not a full blown graph=
=

no, no 'circular' references/crosspoints. Created with Doxygen BTW.

>> All I wanted to know...
>> PS: I have to admit I never wondered about that elephant thing ;)
>
> Well I never wondered about drawing a shape with three co-ordinates =

> defined in the way yours are.

Well, I can think of several reasons why you'd want to visualise a graph=
=

like this one. The implementation of such a thing is as you indicated =

relatively straight forward (graphics & some math), allthough a lot of =

work to do right (image constraints/nodes are unfortunately not points b=
ut =

have their own dimensions). I would have assumed someone made those in P=
HP =

allready, apparantly not (at least, I don't know any, and nobody else =

seems to). The usual choice for problems like this, JPGraph, doesn't see=
m =

to have this.
-- =

Rik Wasmus

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация