Sign in to follow this  

Need a nice algo for scaling in diagram

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this