nature-of-code / noc-book

The Nature of Code book (archived repo, see README for new repo / build system!)

Home Page:http://natureofcode.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Any guru can give some information about the force direct graphic, I'm confused why the nodes drawed with force direct graphic are not affected by gravity and fall down?

duxianpeng opened this issue · comments

Gravity is a valid force, but typically not specified in a force-directed graph. The forces in a force-directed graph are modelled as spring forces (so, along the connections between the nodes). Would gravity be a force modelled in a force-directed graph, some spring (connected to the bottom?) would have to be attached to the nodes.

So, no need to fix/change.

Thanks for the comment and feedback all.