Skip to content
Create large number of Nodes or Groups of Nodes mapped on to an Image.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
env
examples
src
.gitignore
.travis.yml
CONTRIBUTING.md
Cargo.toml
LICENSE
README.md
_.rustfmt.toml

README.md

crates.io Build Status Documentation Test coverage GitHub license

Logo of the project

Graph large number of Connected nodes mapped on to an Image or Gif.

Placing positioned objects on to an Image can cause many issue. This library is meant to ease interacting with images and create higher order abstractions which makes it easy to populate larger Image surfaces with large number of surface objects.

Features

Example

Easily manipulate large number of Nodes with less accuracy through Groups.

use pathfinder::{Group, map};
use std::path::Path;

let mut groups = Group::from_list(&[(0, 0), (100, 100)]);
for group in groups.iter_mut() {
    group.add(100);
}
Map::new()
    .map(&groups)
    .save(&Path::new("out.png"));

Path through a listed of connected nodes.

let pos = [(0, 0), (100, 100), (150, 50), (2000, 4000), (400, 600)];
let nodes = Node::from_list(&pos); // Nodes are named in sequence: A-Z.
let nodes = Node::linked_list(nodes);
let net = Network::new(nodes);
let path = net.path("A", "E");
node::path_print(&path?);

Output

Node plot

Groups

You can’t perform that action at this time.