GithubHelp home page GithubHelp logo

Example Usage about d3-force-cluster-3d HOT 4 OPEN

vasturiano avatar vasturiano commented on September 25, 2024
Example Usage

from d3-force-cluster-3d.

Comments (4)

amcdnl avatar amcdnl commented on September 25, 2024 1

Thanks for your help - I got it working - you can see it here: https://reagraph.dev/?path=/story/demos-cluster--three-dimensions

from d3-force-cluster-3d.

vasturiano avatar vasturiano commented on September 25, 2024

@amcdnl that accessor method should return the central coordinates of the cluster the node is associated to. Or you can choose a node in each cluster that represents the cluster center and just return that node object for the associated nodes.

I noticed that your force diagrams are in 2D. For that, ther regular d3-force-cluster module should suffice. Any specific reason why you prefer to use the 3d variant?

from d3-force-cluster-3d.

amcdnl avatar amcdnl commented on September 25, 2024

should return the central coordinates of the cluster the node is associated to

OK - Thats helpful. Is there a library you would recommend to calculate this?

Any specific reason why you prefer to use the 3d variant?

The library also supports 3D, I was just going to use this for both 2d and 3d. I assumed that would work if I just removed the Z dimension.

from d3-force-cluster-3d.

vasturiano avatar vasturiano commented on September 25, 2024

Is there a library you would recommend to calculate this?

Nothing comes to mind. A common pattern as I mentioned above is to simply use one of the nodes in the cluster as the cluster center. Assuming there are other forces active in the system, this way the cluster centers also keep moving and adjust to each other.

The library also supports 3D, I was just going to use this for both 2d and 3d. I assumed that would work if I just removed the Z dimension.

Ok. Yeah that should work fine. As long as the main force engine is configured with the matching number of dimensions, via numDimensions.

from d3-force-cluster-3d.

Related Issues (5)

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.