# Organic trees

**URL:** <https://discourse.mcneel.com/t/organic-trees/114382>\
**Category:** Grasshopper\
**Tags:** windows\
**Created:** [December 12, 2020, 11:43pm UTC](https://discourse.mcneel.com/t/organic-trees/114382 "2020-12-12T23:43:37Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![laurent\_delrieu](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/laurent_delrieu/32/601605_2.png) [@laurent\_delrieu](https://discourse.mcneel.com/u/laurent_delrieu)\
**Post date:** [December 12, 2020, 11:43pm UTC](https://discourse.mcneel.com/t/organic-trees/114382/1 "2020-12-12T23:43:37Z")

</div>

Here some techniques or link to make organic trees.  
There are not surely good glasses to drink but I wanted some simple geometry to test techniques.

 ![glass_tree](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/c/9/c/c9c8377999f1162c0041a11a3b613519856e8839.jpeg)

There are some components that are very useful to make Trees. Without speaking of the generation of points Proximity 3d and Shortest Walk are the main tool to make trees.

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/b/4/a/b4aca9876b27f669efedb4254e60474d2b84eae7.jpeg)  
The parameter group changes a lot the looking of the tree  
 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/d/3/0/d30862af01bb2fd5165d09ae8dbff81ac60c4a45.png)  
See this discussion

> [@How to create an elevated root system?](https://discourse.mcneel.com/t/how-to-create-an-elevated-root-system/114221/16):
>
> And I forgot to mention that you can play with the number of point in Point Proximity 3D it also possible to use the Length in Shortest Walk to have different directions … Many many way to have better results.

The second useful component is able to smooth the line network. I use one of mine. It is a sort of Catmull&Clark. There are 2 main parameter, number of recursion and factor.

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/a/1/b/a1bfea27e4a1d2eb880a31fcf2b656ff181c189d.jpeg)  
The third useful component will add some realistic branches radius.  
Some explanations are here

> **[Shortest Walk Tapered Branching Script](https://www.grasshopper3d.com/forum/topics/shortest-walk-tapered-branching-script)**
>
> This is the script of Daniel Abalde's Peacock tapered offset post, here:
> 
> http://www.grasshopper3d.com/photo/the-variable-offset-component-spends-0-5-seconds-w…

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/6/c/a/6cabb3e0fab042694fad47136184b151457206f8.jpeg)  
 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/6/c/a/6cabb3e0fab042694fad47136184b151457206f8.jpeg)

I updated it and add some options.

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/f/4/9/f49cefa99ec26b723a71e43cbd9da9ffd29271ad.jpeg)  
 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/6/4/6/646126469b528db544cd178c6dbac4399ea57ba0.jpeg)  
 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/0/0/9/0097c07aacf1c7331dfca238363e7a80286e5ebc.jpeg)

Then there is the classical Dendro

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/0/1/8/018717dfdc5ae599b894c917b8d2af2d2641f9d5.jpeg)

And finally some use of QuadRemesh and some Catmull&Clark

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/a/5/5/a555f7ddf68bdad8719f5a73845f0bbc0a709be5.jpeg)  
 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/d/b/e/dbeb43c7e51e7b7153e4b095633c514e419adb37.jpeg)

---

<div class="post-metadata">

**Author:** ![zhuangjia777](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/zhuangjia777/32/658636_2.png) [@zhuangjia777](https://discourse.mcneel.com/u/zhuangjia777)\
**Post date:** [December 13, 2020, 4:03am UTC](https://discourse.mcneel.com/t/organic-trees/114382/2 "2020-12-13T04:03:27Z")

</div>

Some 3Dprinting slice softwares have function to add tree like structures to support overhanging.

---

<div class="post-metadata">

**Author:** ![laurent\_delrieu](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/laurent_delrieu/32/601605_2.png) [@laurent\_delrieu](https://discourse.mcneel.com/u/laurent_delrieu)\
**Post date:** [December 16, 2020, 10:05pm UTC](https://discourse.mcneel.com/t/organic-trees/114382/3 "2020-12-16T22:05:24Z")

</div>

For sure I have seen some, but these “trees” are made to be deleted and don’t seems too beautiful. But it could surely be interesting to have some tools that can make such trees.

Here I continue making some organic tools. I use K-mean clustering to join branches. Still work to do but trees are a cool subject.

> [@Clustering points](https://discourse.mcneel.com/t/clustering-points/76907/4):
>
> I thought this might be the way to go, but I cant figure out how to use the component or make a definition from it, and theres limited information about it online. Lets say pop2d \> kmeans gives an error of "data failed conversion of points to tensorset. Any pointers? Ive read through this [https://www.grasshopper3d.com/forum/topics/kmeans-1](https://www.grasshopper3d.com/forum/topics/kmeans-1) but theres no clear explanation there

 ![20201216_trees4.effectsResult](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/5/3/7/5371348ab4a30b639d19869dfabac15bb93ae468.jpeg)  
 ![20201216_trees3.effectsResult](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/8/5/4/854ac0661f6eebc844eb2eedcca51517f0d0a03e.jpeg)

 ![20201216_trees2.effectsResult](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/1/a/9/1a99d55bd110904e54acd1af107f1f35c83ac448.jpeg) ![20201216_trees.effectsResult](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/2/0/a/20aeae8787aa491d31e7670e53a3772e683393fa.jpeg)

 ![20201216_trees6.effectsResult](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/b/a/7/ba7b85b450d680f408c39735f1ab48ab5639351a.jpeg)  
 ![20201216_trees5.effectsResult](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/4/d/4/4d476b9ad6738ad94a265f675156250de68bbc31.jpeg)

---

<div class="post-metadata">

**Author:** ![zhuangjia777](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/zhuangjia777/32/658636_2.png) [@zhuangjia777](https://discourse.mcneel.com/u/zhuangjia777)\
**Post date:** [January 3, 2021, 5:59pm UTC](https://discourse.mcneel.com/t/organic-trees/114382/4 "2021-01-03T17:59:50Z")

</div>

These shapes are cool. Lunchbox has a component “k-mean”. it works like a grouping tool.

---

<div class="post-metadata">

**Author:** ![laurent\_delrieu](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/laurent_delrieu/32/601605_2.png) [@laurent\_delrieu](https://discourse.mcneel.com/u/laurent_delrieu)\
**Post date:** [January 3, 2021, 6:23pm UTC](https://discourse.mcneel.com/t/organic-trees/114382/5 "2021-01-03T18:23:50Z")

</div>

Thanks for the tips. I have Lunchbox and lot of others plugin but I don’t use them much nor take enough time to discover them.  
For the K-Means used for tree I needed a library in order to make a tool inside a C# component. I shall look if Lunchbox use an accessible library. It seems they use Accord.

> **[Framework modules](http://accord-framework.net/docs/html/R_Project_Accord_NET.htm)**

---

<div class="post-metadata">

**Author:** ![zhuangjia777](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/zhuangjia777/32/658636_2.png) [@zhuangjia777](https://discourse.mcneel.com/u/zhuangjia777)\
**Post date:** [January 3, 2021, 6:36pm UTC](https://discourse.mcneel.com/t/organic-trees/114382/6 "2021-01-03T18:36:16Z")

</div>

Lunchbox has other math tool along side “k-means”. Accord seams a library heavenly related to machining leaning. Many “AI” GH plugins, like Owl, uses Accord. I am still learning how to using them.

---

<div class="post-metadata">

**Author:** ![RANE](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/rane/32/635408_2.png) [@RANE](https://discourse.mcneel.com/u/RANE)\
**Post date:** [February 8, 2023, 4:25pm UTC](https://discourse.mcneel.com/t/organic-trees/114382/7 "2023-02-08T16:25:40Z")

</div>

Hey Guys,  
I have been trying to follow this topic but i am stuck at a problem.  
I am able to get all the curves and the pipes correct but after this **FAIL to Boolean Union the Surface or Brep**. Does anyone know how to solve this?

[Tree Branch.gh](https://discourse.mcneel.com/uploads/short-url/9XpJrPA6EUrdblnzX7TJjDhXS9P.gh) (14.3 KB)

---

<div class="post-metadata">

**Author:** ![FilmDesigner](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/filmdesigner/32/769432_2.png) [@FilmDesigner](https://discourse.mcneel.com/u/FilmDesigner)\
**Post date:** [February 10, 2023, 3:17pm UTC](https://discourse.mcneel.com/t/organic-trees/114382/8 "2023-02-10T15:17:39Z")

</div>

Beautiful!  
I must admit my grasshopper skills are …lets just say I can follow instructional videos but I have no idea what Im doing. I hope to change that at some point.

Thanks for sharing.

---

<div class="post-metadata">

**Author:** ![laurent\_delrieu](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/laurent_delrieu/32/601605_2.png) [@laurent\_delrieu](https://discourse.mcneel.com/u/laurent_delrieu)\
**Post date:** [February 26, 2023, 9:52am UTC](https://discourse.mcneel.com/t/organic-trees/114382/9 "2023-02-26T09:52:49Z")

</div>

I added some new tools in Nautilus plugin (in validation process the 26th of February 2023)  
Let first begin with a network of curves. It could be lines, polylines or curves. Curve could be closed but it will not work on all scenarios. Curves must not be duplicate.

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/c/7/0/c704196d1f0761e6768af9e5d264073d1ef98708.jpeg)  
Plug theses curves in the component Smooth Network of Curves, Nurbs curves will be transformed to polyline.  
Choose the level of recursion for the smoothing and the factor.  
 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/7/5/5/755df6779f10fdc7fbc1cb06ea3505ce25466eda.jpeg)  
 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/6/d/b/6dbc1dee38c97a5cbb4c11aaadecba229c2a3d2b.jpeg)  
You will see that the outputs are polylines or lines that begins/ends at intersection with other branches. This component could be useful to make a clean network of curves that could be then smoothed but keeping the connections.

Then plug these curves int the component TreeFromNetworkOfCurves

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/3/a/b/3ab275ee3d2fa493d215938bf7ea0f200db0c20e.jpeg)

This component needs 😅  
a network of curves.

- a root position
- a power for the calculation of branches radius branch(i)^n = Sum (branch(i+1)^n)
- a boolean to tell if the calculation of radiuses begin at the leaves or at the root. All the times the radius of the root will be 1 / ONE. You could have 0/Zero/Null radius if you have no licence.

The outputs are

- The original curves
- The points
- The Point Points topology
- The Curve Points topology
- The Point Curves topology
- The radius at each point  
 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/0/9/2/092638a5369cde6c0bfe83c1af785aa066195a40.jpeg)  
 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/9/5/9/95941b289d339988283b141d49d7a496c63ac5a4.jpeg)  
 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/7/7/9/779386a6e160f72910276fe67ac2149a8ece97f0.jpeg)

Then if you want to use Dendo use the RadiusInterpolate to populate the branches with points and radius.

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/4/4/f/44f73ad77d1e4a7f31a1c6b8b8343af1f350d9a6.jpeg)

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/1/a/0/1a0a8b9e70fef4375585f804e5b83dcc7568ab21.jpeg)  
 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/3/f/d/3fdceedbcbcc67413d51d2c84380dc70c12d6736.jpeg)
