Saturday 17 September 2011

Graph.addPhysics()


I've been wanting for a long long time to make this but never got the chance
It is supposed to draw a graph, but fails to settle down sometimes and starts acting like an ameoba

Edge list



Write one edge per line

Ex:
0 1 (edge between nodes 0 and 1)
1 2 (edge between nodes 1 and 2)
2 0 (edge between nodes 2 and 0)

8 comments:

  1. Ca o idee, ar fi bn sa pui si tu o descriere la ce faci, ca altfel pare doar random :D

    ReplyDelete
  2. Misto! Dar unele grafuri nu se stabilizeaza... se fataie la infinit.

    ReplyDelete
  3. Ce dragut e!
    Mi-ar placea sa vad cum ricoseaza din pereti.
    Sa stii ca daca-i dai muchia 2 2 (i i) nu-l deseneaza.

    ReplyDelete
  4. Alta treaba dom'le. Si daca ma chinui putin as putea face un turn eiffel care sa danseze.

    ReplyDelete
  5. Try to plot this, it runs forever:

    0 1
    1 2
    2 3
    3 4
    4 5
    5 0
    2 5
    4 1

    ReplyDelete
  6. 1 2
    2 3
    3 1
    0 1
    0 3

    ReplyDelete
  7. Pentagon:

    0 1
    1 2
    2 3
    3 4
    4 0
    5 0
    5 1
    5 2
    5 3
    5 4

    ReplyDelete
  8. 0 1
    1 2
    2 3
    3 4
    4 0
    5 0
    5 1
    5 2
    5 3
    5 4

    6 7
    7 8
    8 6

    9 10
    10 11
    11 12
    12 9
    10 12
    11 9

    13 14

    15 16
    16 17
    17 18
    18 19
    19 20
    20 15
    21 15
    21 16
    21 17
    21 18
    21 19
    21 20

    ReplyDelete