We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › Terrain generation in 3D
Page Index Toggle Pages: 1
Terrain generation in 3D (Read 964 times)
Terrain generation in 3D
Jul 8th, 2008, 2:41pm
 
Hi,
For a project, I need to generate some terrains in 3D from a list of point (each point have x, y coordinates and a elevation z). My problem is that I don't know to generate it...
After a search with google, I have found some methods which uses the delaunay triangulation's algorithm, but I don't know how to write this algorithm in processing and I haven't found a library written in java for this purpose.
Has someone a library or can someone help me to create a terrain from a list of point ?
Thanks
Vincent



Re: Terrain generation in 3D
Reply #1 - Jul 8th, 2008, 6:17pm
 
Processing has a noise(x,y); function which gives you a sort of terrain effect.
Re: Terrain generation in 3D
Reply #2 - Jul 8th, 2008, 6:33pm
 
googling "java delaunay" gives interesting results. you can find some sources like
http://www.cse.unsw.edu.au/~lambert/java/3d/implementation.html
or
http://www.cs.princeton.edu/introcs/36inheritance/Delaunay.java.html
even though those are not ready-to-use-in-processing.

one possible way to proceed :
- iterate through your list of 3d points
- for each possible triplet (triangle), calculate the circumcenter and the sphere containing the triangle
- if there is no other point inside the sphere, you can render this triangle (or save it for later rendering)
Re: Terrain generation in 3D
Reply #3 - Jul 9th, 2008, 2:12am
 
hi. i've never used delaunay, but i made a terrain using perlin noise. you can find it here http://www.rui-m.com/p5/perlinsurface/

its basically a bidimensional array of points (containing x, y, z variables). the x and z coordinates are calculated when iterating through the loop when creating the objects thus making a grid and the y is then determined by the perlin noise.


hope it helps
Page Index Toggle Pages: 1