Maths/programming problem
Sep. 21st, 2007 04:50 pmAt work a colleague has run up against a problem he is trying to solve.
The situation is that he has a piece of text in the middle of the screen and then five pieces of text coming out of it. Imagine these to beon at the end of radial lines from the center. There is a circle around the center point they cannot enter and a bounding rectangle that they cannot be outside of.
How would you decide where to position them? The number can vary and the text can change. I think you can roughly imagine it to be a central rectangle with the outer text represented by a rectangle.
We have tried one algorithm/implementation but it seems unsatisfactory. I won't mention what it is for fear of bias but will comment if other people do.
And if you are not a mathematician/programmer I am happy to hear in non-maths/programming terms what you would do. If it sounds good somebody else can do the mathsy side of things. :)
Edit: Just to clarify the pieces of text are ordered so you can't choose where they go. Also I misrepresented what the additional text positioning was I think so have edited slightly. To add though the surrounding pieces of text wil be rendered in standard horizontal left to right style.
The situation is that he has a piece of text in the middle of the screen and then five pieces of text coming out of it. Imagine these to be
How would you decide where to position them? The number can vary and the text can change. I think you can roughly imagine it to be a central rectangle with the outer text represented by a rectangle.
We have tried one algorithm/implementation but it seems unsatisfactory. I won't mention what it is for fear of bias but will comment if other people do.
And if you are not a mathematician/programmer I am happy to hear in non-maths/programming terms what you would do. If it sounds good somebody else can do the mathsy side of things. :)
Edit: Just to clarify the pieces of text are ordered so you can't choose where they go. Also I misrepresented what the additional text positioning was I think so have edited slightly. To add though the surrounding pieces of text wil be rendered in standard horizontal left to right style.