Threejs, ground drawing, what shape


This Content is from Stack Overflow. Question asked by john-jones

I am making an animation in the Threejs Javascript library.

I want to draw a ground.

Probably using a 2d array where each point represents the elevation at that location.
I could then iterate through it do draw the planes between them.

But I can’t find a shape that fits this purpose. There is plane but its just a 2d shape, with x,y, width and height. I can’t use that to draw between the lines for i need to change it in the third dimension.

There is box, but that’s just a box with x,y,width and height. I can’t use that to connect a plane between those four points.

I’ve been looking at some hedrons but its not clear how they are to be used and how they would fit this purpose.

How should I paint a ground with varying elevations?
Which shape is best to use?


This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?