1use fdg_sim::{ForceGraph, ForceGraphHelper, Simulation, SimulationParameters};
2
3fn main() {
4    let mut graph: ForceGraph<(), ()> = ForceGraph::default();
6
7    let one = graph.add_force_node("one", ());
9    let two = graph.add_force_node("two", ());
10    let _three = graph.add_force_node("three", ());
11    graph.add_edge(one, two, ());
12
13    let mut simulation = Simulation::from_graph(graph, SimulationParameters::default());
15
16    for frame in 0..50 {
18        simulation.update(0.035);
20
21        println!("---- frame {frame} ----");
23        for node in simulation.get_graph().node_weights() {
24            println!("\"{}\" - {:?}", node.name, node.location);
25        }
26    }
27}