Results 1 to 7 of 7
  1. #1
    elmetalor is offline Member
    Join Date
    May 2011
    Posts
    4
    Rep Power
    0

    Smile Please Help, Really need help :(

    I must develop an application that read a txt file in order to draw the graph and color it, i just made the Adjascence Matrix and the table of color for each node, i'm stuck in the graphic part, i can't draw the graphic (color it neither) so :
    if it's possible to help me draw the graph and color it, i'm new with graphic interface so please help :)
    PS : i can insert with the txt file of the graph, another txt file with the position of the nodes, but its an alternative solution


    Here an exemple for my txt file :
    // (p beginnig, 7 node and 22 edges)
    p edge 7 22
    e 1 2
    e 1 3
    e 1 4
    e 1 5
    e 2 1
    e 2 5
    e 2 6
    e 3 1
    e 3 4
    e 3 7
    e 4 1
    e 4 3
    e 4 5
    e 5 1
    e 5 2
    e 5 4
    e 5 6
    e 6 2
    e 6 5
    e 6 7
    e 7 3
    e 7 6

    //

    Screenshots :




    The left part is for the graph drawing and coloring =)
    the last table is the color table, its a coloring with only for color in fact
    If u need my project folder i can send it to anyone how can help me, i need it within 7 days, it needs only the graph drawing
    i hope you can help me =)

    Thx in advance and sorry for my english :)

  2. #2
    elmetalor is offline Member
    Join Date
    May 2011
    Posts
    4
    Rep Power
    0

    Default



    Exemple of a result :D

  3. #3
    elmetalor is offline Member
    Join Date
    May 2011
    Posts
    4
    Rep Power
    0

    Default



    Another one, simplier, with a txt file of node's position

  4. #4
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,435
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by elmetalor View Post
    [IMG] [snip picture ]
    Exemple of a result :D
    If you know the adjacency matrix and the colours of the vertices you don't know the Euclidian position of the vertices so any position will do; your picture is just an 'artist impression' of the graph.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  5. #5
    elmetalor is offline Member
    Join Date
    May 2011
    Posts
    4
    Rep Power
    0

    Default

    Quote Originally Posted by JosAH View Post
    If you know the adjacency matrix and the colours of the vertices you don't know the Euclidian position of the vertices so any position will do; your picture is just an 'artist impression' of the graph.

    kind regards,

    Jos
    Thx for answering, i know i get the image from google, but the other one is developped with C and it get a good result for me, but i'm blocked with the graphics of java, any help ?

  6. #6
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,435
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by elmetalor View Post
    Thx for answering, i know i get the image from google, but the other one is developped with C and it get a good result for me, but i'm blocked with the graphics of java, any help ?
    If it's the graphics part that's bothering you: read the API documentation of the Graphics class: it can draw and fill ovals, set colors and draw lines for you.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  7. #7
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,193
    Rep Power
    19

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •