Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


3D Tree display

This topic is 5333 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I need some help. I have a tree data structure that I need to display in 3D. The edges between trees will have inconsistent length and # of children. Readability of the tree is paramount. I''m trying to think of some kind spring-loaded algorithm but I just can''t quite get my head around how it will work. I''ve thought about the root node taking a hemisphere of all possible directions, dividing it into equal cones for each child, and recursing. The problem seems to be the math and maintenance of state information. Has anybody done something like this before? I''m just stuck.

Share this post

Link to post
Share on other sites
Do you actually need to draw the graph 3 dimensionally or can you draw it 2 dimensionally in a 3D space?

Graph drawing gets pretty hairy, and can be heavily dependent on what constraints you have to satisfy (a couple of things that come to mind with your problem are a)will the number of children of each node have a minimum or maximum bound? b) are the lengths of edges part of the data, or is it just that you don''t mind if the lengths are inconsistent?). For example, with 2D graph drawing, if it is a requirement that there are no lines crossed in the drawing, that limits the set of graphs you can draw. If you are drawing a class of graphs that requires crossings, then you may try to minimize crossings. Or you may need to draw the graph on a 2D grid, where you can only have vertical and horizontal line segments, so you try to minimize the number of bends.

I would try googling for stuff like "graph drawing", "graph visualization" "3d graph drawing," etc. You''ll probably find some resources that will give you some good ideas and point you in the right direction.

If you think your graph could be represented in 2D, you could check out VCG (Visual Compiler Graph)


It''s a graph drawing package that I''ve used to visualize the flow control graphs built by the intermediate stages of a compiler. It''s free, relatively simple to use, they tell you what the file format is, and you just write out a data file with information about what nodes exist and what edges connect them. There''s lots of features available for labeling things and color coding things, but it''s easy to get up and running, and can be very useful. You may even have luck finding a similar package that draws 3D graphs.

[Edited by - The_Incubator on November 28, 2006 11:48:00 PM]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!