Coder Social home page Coder Social logo

nx3d's Introduction

nx3d

-missing homepage- -missing docs- -missing pypi- -missing build status-

-missing project maturity- -missing download count-

A 3D plotting library for networkx built on panda3d.

-missing gif of frucht graph-

Installation

pip install nx3d

Check your installation

The four nx.Graph classes

nx.Graph demo

python -m nx3d

nx.DiGraph demo

python -m nx3d dir

nx.MultiGraph demo

python -m nx3d mul

nx.MultiDiGraph demo

python -m nx3d mul dir

Dynamic graph processes

Diffusion demo

python -m nx3d diffusion watt nolabel

Game of Life demo

python -m nx3d life nofilter

Usage

In your Python code:

import networkx as nx
import nx3d

g = nx.frucht_graph()
nx3d.plot(g)

Next steps

Check out the docs for tutorials, how-to-guides, explanations, and reference material.

nx3d's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nx3d's Issues

mouse click object -> event

Add an interface for handling edge-click and node-click events; also click and drag;
Default click should highlight node and freeze its pos.
Default click and drag should update remaining pos with spring algorithm;

Instead of 'val' use 'weight'

easier interoperability with nx algorithms that use 'weight' as a special graph attribute

also if ^ is indeed true, that 'weight' is an nx SGA, update the docs Usage SGA explanation with this information.

Update RTD index page

  • What it is, what it isn't
  • Design principles (graph attribute controls render, then defaults)
  • Usage

default camera spin

It'd be better to have the demo start spinning rather than static.
If the user hasn't given keyboard input in the last 3.5 seconds, start spinning.

Variable graphs for demos

instead of just the frucht graph, allow any nx graph initializer (though for GoL this will require scaling the life/death rules relative to degree of node)

Make graph rotatable

Currently wasd controls the camera.
Make ijkl rotate the graph itself.

To do so:

  • Parent the p3d.nodes to a p3d.node at the center of mass.
  • Then add task or event for handling ijkl input.
  • You'll be able to tell it works if when using ijkl the graph moves but the lighting (which is relative to the scene) does not.

This enables p3d physics (change angle of p3d nodes relative to z axis).

Dynamic 3d models for nodes

  • default argument to Nx3D e.g. icosphere, icosphere_2, pyramid, cube
  • set via "marker" attribute
  • demo with state_trans_func

Both demos to support M, D, and MD

diffusion over multigraphs and digraphs etc is straightforward
you'll have to change GoL rules a little to make it work over a digraph or multigraph - scaling life/death rules relative to node degree seems like a reasonable approach

a bug

OSError: Could not load model file(s): [WindowsPath('C:/Users/admin/AppData/Local/Programs/Python/Python39/lib/site-packages/nx3d/data/icosphere.bam')]

Add GUI control function to Nx3D __init__

User should be able to control some GUI output text based on the contents of their graph. Signature will probably be something like

  gui_control_func: Callable[Graph, list[str]]

MultiGraph support

Need to be able to plot multi-graphs, requires bent edges so they don't overlap

Better keyboard support

  • press esc to quit
  • press r to reset camera position
  • press t to toggle default spin
  • press h to toggle GUI
  • press m to toggle mouse control

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.