Quantcast
Viewing all articles
Browse latest Browse all 4929

How to draw tubes

@edapx wrote:

Hello, I'm trying to implement an LSystem in a 3D space in order to draw threes like this https://upload.wikimedia.org/wikipedia/commons/7/74/Dragon_trees.jpg
I'm not interested in the leaves, but only on the trunk and its ramification.

The form that I'm looking for is a tube, that can be used to draw the the parts of the three.
Looking around I've found 2 ways to do this:
1) Using ofPolyline with this addon https://github.com/julapy/ofxTubePrimitive
2) Defining 3d points without using ofPolyline, for each of them define the direction and add a circle, then connect them. There are 2 posts on the forum with this solution, http://forum.openframeworks.cc/t/draw-3d-tubes/12705/6 http://forum.openframeworks.cc/t/render-worm-body-tube/3383 by @NickHardeman and @Poiex, but both of them are a bit unclear to me.

Is there a preferred way to accomplish this task? The first addon looks specific for a single line, and i need more than one line in order do draw all the ramification of a three.
I do not want to use the cylinder primitive, because this can lead to ugly results http://www.frank-buss.de/smalltalk_preview/tree.jpg.

Any suggestion is more than appreciated Image may be NSFW.
Clik here to view.
:wink:

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4929