|
treeiniTreeStructure (iniTree with vertices output)Some days ago I posted iniTree plugin, that allow to draw recursive ternary trees. Gtoledo suggested to rewrite the plugin as a provider. Asking the community what is the best way to output a structure from a QCplugin, I used the method suggested by dust, and the implemented iniTreeStructure, which is a iniTree plugin witch outputs vertices positions. Inputs:
Outputs:
iniTree - draw your own recursion treeHello there, I just want to share with you a simple that draws a ternary tree. The algorithm is very simple and uses recursion. Here is what it does in pseudocode (for n-ary tree):
As you can see, I used glRotate/glTranslate and glBegin(GL_LINES)/glEnd() calls, in old OpenGL style. Maybe this is the reason why with more than 8/9 levels I don't obtain good performance. Using vbo will result in better performance, but I'm still not sure about how to do that. It is a very simple plugin, but if used in audio-reaction compositions I think it can produce interesting results. So let me know if someone use it in some cool way! :) Download(plugin and example composition)
|