Jump to content
  • Advertisement
Sign in to follow this  
speciesUnknown

Need a nice algo for scaling in diagram

This topic is 3301 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

Hi, I'm working on a diagram which looks something like this: The black lines are not rendered, they are simply for a visual aid. Each curve has a number of curves underneath it - these are its children. My current system for rendering them is recursive, i divide the available space into two vertical sections; the top one I render the current node in, and then the bottom one I render all its children. This means the children are arranged horizontally underneath their parent. I need a nice system for scaling child nodes relative to their parents (although there may be several under each one, say up to 6) such that the nodes are not higher than they are wide, and such that I can limit the depth displayed at any one time to arbitrary levels (say, 4 levels).

Share this post


Link to post
Share on other sites
Advertisement
Thats so simple... why didnt I think of that...

I guess its one of those situation where you cant see the wood for the trees. I can do that, then normalise the view so the diagram fills the whole canvas area.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!