© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
27 replies
KaenguruuDev

Determine the positions of nodes inside of a graph

I've attatched some images to show what I mean. One shows how the current (not implemented by me) algorithm sorts the nodes. It is very suboptimal as it has a lot of crossings and very cluttering connections. The other picture shows how I rearranged it manually to be way easier to understand. My question now is: How do I figure out the positions for those nodes?
As for the structure of the code:
The last one (with only connections entering on the left side of the node) is the "Root" that has children and each children then also has children etc.

While I wouldn't mind a pre written algorithm, if there isn't one readily available, I'd appreciate some guidance on what steps the algorithm should have.
Thanks in advance!
image.png
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Determine positions of the longest and shortest word inside of a string list
C#CC# / help
4mo ago
✅ Determine the .NET type of a json object
C#CC# / help
4y ago
graphUser almost fully NULL - Graph API
C#CC# / help
3y ago
✅ Combining a List inside of a Select
C#CC# / help
3y ago