# Quick Tree Generator

> Learn about the quick tree generator extension.

Source: https://doc.babylonjs.com/communityExtensions/treeGenerators/quickTreeGenerator

![Generated Tree ](https://doc.babylonjs.com/img/extensions/trees/quick1.webp)

The function QuickTreeGenerator uses a sphere with randomized vertices to generate a tree.

A demo can be found at: [Playground: Quick Tree Generator Example](https://playground.babylonjs.com/#/#XG2DFK) - Simple example of the quick tree generator.

## How to use it

Clone or copy the file https://github.com/BabylonJS/Extensions/tree/master/TreeGenerators/QuickTreeGenerator

```javascript
const tree = QuickTreeGenerator(sizeBranch, sizeTrunk, radius, trunkMaterial, leafMaterial, scene);
```

## Parameters

sizeBranch - Sphere radius used for branches and leaves, 15 to 20.

sizeTrunk - Height of the trunk, 10 to 15.

radius - Radius of the trunk, 1 to 5.

trunkMaterial - Material used for the trunk.

leafMaterial - Material for the canopies.
