PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.php > How to visualize network
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
How to visualize network

Réponse
 
LinkBack Outils de la discussion
Vieux 18/01/2008, 21h06   #1
itschy
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut How to visualize network

Hi.

I have a couple of nodes (just ids, no coordinates whatsoever) and
links betweens them (weighted).
Is there any existing solution to visualize this network in php?

Thanks

itschy
  Réponse avec citation
Vieux 18/01/2008, 22h22   #2
Iván Sánchez Ortega
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How to visualize network

itschy wrote:

> I have a couple of nodes (just ids, no coordinates whatsoever) and
> links betweens them (weighted).
> Is there any existing solution to visualize this network in php?


You have to ask yourself the following question:

Is there any existing solution to visualize this network in HTML?


Cheers,
--
----------------------------------
Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-

El tiempo libre es más volátil que el éter...
  Réponse avec citation
Vieux 18/01/2008, 22h31   #3
Jensen Somers
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How to visualize network

Hello,

itschy wrote:
> Hi.
>
> I have a couple of nodes (just ids, no coordinates whatsoever) and
> links betweens them (weighted).
> Is there any existing solution to visualize this network in php?
>
> Thanks
>
> itschy


PHP has support to create images, so my guess is - if I understand 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.

I'm sure some examples exist, but I can't really name one to be honest.

- Jensen
  Réponse avec citation
Vieux 18/01/2008, 22h46   #4
itschy
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How to visualize network

On 18 Jan., 23:31, Jensen Somers <jensen.som...@gmail.com> wrote:
> PHP has support to create images, so my guess is - if I understand 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 according
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 draw
it) in php.
Tough luck I guess...

itschy
  Réponse avec citation
Vieux 19/01/2008, 16h19   #5
The Natural Philosopher
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How to visualize network

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 understand 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 according
> 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 draw
> 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 its
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 of
perpendiculars.

Namely:-

Cx^2+Cy^2=(5)^2
(3-Cx)^2 +Cy^2=(4)^2

Now there are either two, or none, solutions for Cy as there always are
for quadratics. One solution is the mirror of the other.

Now go solve it.

Its your homework, not mine.


  Réponse avec citation
Vieux 19/01/2008, 18h08   #6
Luuk
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How to visualize network


"itschy" <google@00l.de> schreef in bericht
news:58f6331e-c13b-4226-a64c-9f7bc1ea8726@v67g2000hse.googlegroups.com...
> On 18 Jan., 23:31, Jensen Somers <jensen.som...@gmail.com> wrote:
>> PHP has support to create images, so my guess is - if I understand 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 according
> 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 draw
> it) in php.
> Tough luck I guess...
>
> itschy



aaah, you mean something like:
http://www.graphviz.org/Gallery/directed/hello.html
this is a sample with nodes 'hello' and 'world'
but this sollution does not give you weight...
(see also: http://www.graphviz.org/webdot/basic.html )

and, of course, this is not a PHP solution...




  Réponse avec citation
Vieux 19/01/2008, 18h23   #7
itschy
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How to visualize network

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 understand 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 according
> > 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 draw
> > 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 its
> 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 of
> perpendiculars.
>
> Namely:-
>
> Cx^2+Cy^2=(5)^2
> (3-Cx)^2 +Cy^2=(4)^2
>
> Now there are either two, or none, solutions for Cy as there always 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, what
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 finding
this thread can use it. but next time please don't assume everyone
else is stupid!
  Réponse avec citation
Vieux 19/01/2008, 18h26   #8
itschy
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How to visualize network

On 19 Jan., 19:08, "Luuk" <l...@invalid.lan> wrote:
> "itschy" <goo...@00l.de> schreef in berichtnews:58f6331e-c13b-4226-a64c-9f7bc1ea8726@v67g2000hse.googlegroups.com...
>
>
>
> > On 18 Jan., 23:31, Jensen Somers <jensen.som...@gmail.com> wrote:
> >> PHP has support to create images, so my guess is - if I understand 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 according
> > 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 draw
> > it) in php.
> > Tough luck I guess...

>
> > itschy

>
> aaah, you mean something like:http://www.graphviz.org/Gallery/directed/hello.html
> this is a sample with nodes 'hello' and 'world'
> but this sollution does not give you weight...
> (see also:http://www.graphviz.org/webdot/basic.html)
>
> and, of course, this is not a PHP solution...


Thanks for your answer.
I know the dot package, actually wrote my master thesis using it, but
as you said, its not a php solution.

To anticipate the next answer in this thread: I know about cgi etc,
but I do not have any rights on the server this is supposed to run, so
i search a PURE php solution.
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 07h35.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,34127 seconds with 16 queries