Hill Data is Strange to me

Started by
11 comments, last by Josheir 5 years ago

I am trying to visualize if the attached diagram of data of triangles is correct for the attached hill image.  I used a nested for loop to find all triangles with any vertices having a height greater than zero.  The two triangles marked with an X surprisingly have no height values and the shape of the triangles is odd to me.  The triangles marked with A are left triangles and the triangles marked with B are right triangles.  The rendering was done in OpenGL with C++, and the X coordinates and  Z coordinates are by convention.  

The one point with a height is shown here:

 


void addHillsManually()
{
	
	heightMapFromArray[20][20] = .5;
}

Thank you,

Josheir

Scan_Pic0007.jpg

hill.jpg

Advertisement

Can you just put it in wire frame?

What exactly looks strange to you? Assuming that the thick point in the center is the only point with elevation, the result looks perfectly correct and according to the diagram to me.

2 minutes ago, wurstbrot said:

What exactly looks strange to you? Assuming that the thick point in the center is the only point with elevation, the result looks perfectly correct and according to the diagram to me.

Yeah I was kind of thinking that too, but then I thought maybe there are other vertexes that are supposed to be higher also.

As long as you don't do some sort of height interpolation/smoothing, no.

11 hours ago, wurstbrot said:

What exactly looks strange to you? Assuming that the thick point in the center is the only point with elevation, the result looks perfectly correct and according to the diagram to me. 

It looked asymmetrical,with a point in the center I thought that the triangles marked X would also have height. I am now seeing that the image's B3 is smaller than the combined A3 and B2.  Just so I get it, the total area of B3 is now half that of the combination of A3 and B2.  It's very hard to explain but I think I am seeing it right now.

And for a symmetrical hill I should use the attached image's design.

Are these right?

Thank you.

Josheir

Scan_Pic0008.jpg

17 hours ago, fleabay said:

That's not correct. The top right diagonal and bottom left diagonal would need to be flipped for that result.

What do you mean? The 3D image shows exactly what one expects from the 2D drawing.

 

@Josheir

With the geometry on the new diagram, you'll get a pyramid with a square base.

In the end, it depends on what you want, of course. But in any case, your code appears to work correctly. If it does not do what you want, then you're not telling it what you want ;).

 

 

This topic is closed to new replies.

Advertisement