Pulling the 2nd point in three-dimensional space

I am using OpenTK (OpenGL) and a general tip would be helpful.

I have three-dimensionality. I have one point in this locality O (x, y, z) and two perpendicular lines passing through this point that will serve as my X and Y axes.

Now I have a set of 2d points with polar coordinates (range, theta). I need to find which points on the ground correspond to these points. I am not sure if this is the best way to do this. I can think of two ideas:

Let's say I draw A (x1, y1).

  • Find the intersection of the plane passing through O and A, which is perpendicular to the XY plane. This will give me a polyline (semantics can be turned off). Now on this line I find a point that is visible from O and is at a range distance.

  • Create a circle that is perpendicular to the XY plane with a radius of "range", find the intersection points on the terrain, find which of them are visible from O and recline.

I understand that I can find several points that satisfy the conditions, so I will do an additional check based on the topography, but for now I need to get a smaller set that satisfies this condition.

I am new to opengl, but I get the geometry pretty well. I am wondering if something like this exists in opengl, since this is a standard problem with ground-based measuring systems.

+4
source share
2 answers

, , . , (r, angle) (x,y).

. , O x, (r_i, angle_i) x_i = r_i*cos(angle_i) y_i = r_i*sin(angle_i). (.. a radii, x), , .

2D- (, Terrain[x][y] = z), (x_i,y_i), . , (x_i, y_i) [x] [y] .

, , :

  • (x,y) ;
  • (x_i,y_i) .

, OpenGL - , , .

+1

, ... .

O (x, y, z). , . , . - 2D-. , , - 3D A '(x, y, 0), , A at (r, t), , , .

(t) . , . r - ! - . , ? - , , (t) NOT NECESSARILY (r).

. , RonL , (x, y), (z) .

, . : ?

0

Source: https://habr.com/ru/post/1569173/


All Articles