POV-Ray : Newsgroups : povray.binaries.images : voronoi forrest Server Time: 19 Feb 2019 22:42:22 GMT
  voronoi forrest (Message 1 to 8 of 8)  
From: ingo
Subject: voronoi forrest
Date: 4 Feb 2019 12:59:52
Message: <XnsA9EC8E6578D7Bseed7@news.povray.org>
Proof of concept, voronoi forrest with about a 100 trees and saplings
with non intersecting foliage. 

Generate a bunch of random points. Put them in Voro++ or as I did Tess
https://github.com/wackywendell/tess a python binding to Voro++ (on
windows you need the MS compiler tool thingy). The output I used is a
list of neighbours per point. From that I calculated the nearest
neighbour per point. Devided the distance by two and used that as
radius for a sphere. 

There are other options, one could use the centroid of a voroni cell
and calculate the biggest cell fitting sphere based on that position. 
The Voro++ commandline program can output vertices and normals relative
to a points position. This can easily be used to create a foliage by
using the vertices to construct a union of polygons. Scale the union
down a bit and move it to the right position. The normals could be used
for intersecting multiple planes to create a solid foliage. 

attached are forrest.pov for the first step, the creation of random
points and it writes a python file vorodat.py. That is needed by
vorotess.py, the second step, that does the voro++ thing and writes
POV-Ray arrays to forrest.inc Finally Forrest_spheres.pov uses the
include to make the trees. 

I won't persue this any more for the moment eventhough there are many
possibilties. Also for clouds etc. 

https://www.youtube.com/watch?v=J4-x_sBX9tk

ingo


Post a reply to this message


Attachments:
Download 'forrest_spheres.jpg' (251 KB)
Download 'forrest.pov.txt' (3 KB)
Download 'forrest_spheres.pov.txt' (1 KB)
Download 'vorotess.py.txt' (1 KB)

Preview of image 'forrest_spheres.jpg'
forrest_spheres.jpg


 

From: ingo
Subject: Re: voronoi forrest
Date: 4 Feb 2019 13:02:31
Message: <XnsA9EC8ED92EA29seed7@news.povray.org>
in news:XnsA9EC8E6578D7Bseed7@news.povray.org ingo wrote:

> attached are forrest.pov

the files, i hope,

ingo


Post a reply to this message


Attachments:
Download 'forrest.pov.txt' (3 KB)
Download 'forrest_spheres.pov.txt' (1 KB)
Download 'vorotess.py.txt' (1 KB)

From: Bald Eagle
Subject: Re: voronoi forrest
Date: 4 Feb 2019 19:10:01
Message: <web.5c588d50f4d98fc6765e06870@news.povray.org>
ingo <ing### [at] tagpovrayorg> wrote:
> Proof of concept, voronoi forrest with about a 100 trees and saplings
> with non intersecting foliage.

> I won't persue this any more for the moment eventhough there are many
> possibilties. Also for clouds etc.


Nice, although I might be tempted to loosely correlate the size of the bole with
the height of the tree and diameter of the trunk.
Tall narrow trees might be done with scaled spheres to give a tall but narrow
ellipsoid.

Good work  :)


Post a reply to this message

From: ingo
Subject: Re: voronoi forrest
Date: 4 Feb 2019 20:49:45
Message: <XnsA9ECDE0F8AF2Dseed7@news.povray.org>
in news:web.5c588d50f4d98fc6765e06870@news.povray.org Bald Eagle wrote:

> Good work  :)
> 
> 

thanks,

ingo


Post a reply to this message

From: Thomas de Groot
Subject: Re: voronoi forrest
Date: 5 Feb 2019 07:51:30
Message: <5c594082$1@news.povray.org>
On 4-2-2019 20:06, Bald Eagle wrote:
> ingo <ing### [at] tagpovrayorg> wrote:
>> Proof of concept, voronoi forrest with about a 100 trees and saplings
>> with non intersecting foliage.
> 
>> I won't persue this any more for the moment eventhough there are many
>> possibilties. Also for clouds etc.
> 
> 
> Nice, although I might be tempted to loosely correlate the size of the bole with
> the height of the tree and diameter of the trunk.
> Tall narrow trees might be done with scaled spheres to give a tall but narrow
> ellipsoid.
> 
> Good work  :)
> 

I agree. Incidentally, in one of the latest Nature journals (vol.265, 17 
January 2019, p.280) there was a photograph heading the article "The 
Forest Question", that shows the canopy of a trees species - I think 
from Madagascar - that do not touch mutually. The branches just stop 
growing before reaching the canopy of a neighbouring tree. From below, 
it gives the impression of a crackle pattern.

This is an exception. most other trees have more or less 
interpenetrating canopies.

-- 
Thomas


Post a reply to this message

From: And
Subject: Re: voronoi forrest
Date: 6 Feb 2019 05:35:01
Message: <web.5c5a71daf4d98fc670c84ee0@news.povray.org>
ingo <ing### [at] tagpovrayorg> wrote:
> Proof of concept, voronoi forrest with about a 100 trees and saplings
> with non intersecting foliage.
>
> Generate a bunch of random points. Put them in Voro++ or as I did Tess
> https://github.com/wackywendell/tess a python binding to Voro++ (on
> windows you need the MS compiler tool thingy). The output I used is a
> list of neighbours per point. From that I calculated the nearest
> neighbour per point. Devided the distance by two and used that as
> radius for a sphere.
>
> There are other options, one could use the centroid of a voroni cell
> and calculate the biggest cell fitting sphere based on that position.
> The Voro++ commandline program can output vertices and normals relative
> to a points position. This can easily be used to create a foliage by
> using the vertices to construct a union of polygons. Scale the union
> down a bit and move it to the right position. The normals could be used
> for intersecting multiple planes to create a solid foliage.
>
> attached are forrest.pov for the first step, the creation of random
> points and it writes a python file vorodat.py. That is needed by
> vorotess.py, the second step, that does the voro++ thing and writes
> POV-Ray arrays to forrest.inc Finally Forrest_spheres.pov uses the
> include to make the trees.
>
> I won't persue this any more for the moment eventhough there are many
> possibilties. Also for clouds etc.
>
> https://www.youtube.com/watch?v=J4-x_sBX9tk
>
> ingo


This is good. But for a realistic tree, should write further codes for stems and
leaves grow on your sphere positions. If you are willing, I can introduce what
the algorithm I saw from the arbaro.


Post a reply to this message

From: And
Subject: Re: voronoi forrest
Date: 6 Feb 2019 05:40:01
Message: <web.5c5a72b4f4d98fc670c84ee0@news.povray.org>
Another question is: Is it efficient for about 10000~ 100000 trees?


Post a reply to this message

From: ingo
Subject: Re: voronoi forrest
Date: 6 Feb 2019 09:22:00
Message: <XnsA9EE69758344Eseed7@news.povray.org>
in news:web.5c5a72b4f4d98fc670c84ee0@news.povray.org And wrote:

> Another question is: Is it efficient for about 10000~ 100000 trees?
> 

The pre processing time is fast, but I currently run into memory 
allocation problems with Tess. With Voro++ no problem. once everything 
works parsing the 'trees' by POV-Ray will take the most time,

ingo


Post a reply to this message

Copyright 2003-2008 Persistence of Vision Raytracer Pty. Ltd.