TerrainQuad and heightmap

Hi guys,

Im new to JME and playing with TerrainQuad and heightmaps.

I created a basic heightmap with one side at 0 height and incrementing values to the opposite side.

When looking at the terrain in wireframe I unexpectedly see two sides with 0 height (or going down to 0 height) when the heightmap had values greater than 0 for those sides.

How can I correct those edges?

int width = 32;
float frac = 1 / (float)width;
float[] hm = new float[widthwidth];
for (int y=0; y < width; y++) {
for (int x=0; x < width; x++) {
hm[x + y
width] = x * frac * 2;

terrain = new TerrainQuad("my terrain", 65, width+1, hm);

TerrainLodControl control = new TerrainLodControl(terrain, getCamera());


never mind, got it working:

int width = 33;

terrain = new TerrainQuad(“my terrain”, 65, width, hm);