E
E
Evgeny Petryaev2021-07-12 22:10:41
Mathematics
Evgeny Petryaev, 2021-07-12 22:10:41

How to convert 3d to 1d and vice versa?

Let's say there is a room model, it needs to be converted into a vector, and then back?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Armenian Radio, 2021-07-13
@gbg

Just like how a two-dimensional raster turns into a one-dimensional bitstream:

ABCD
EFGH
IJKL
MNOP

->

ABCDEFGHIJKLMNOP

That is, we put each line of the raster in the tail of our sequence.
For a voxel model, we will get a cube of voxels - we take the top layer, it is 2D, we already know how to unfold 2D in 1D, we take the second layer and so on.

G
Griboks, 2021-07-13
@Griboks

Use projection. For example, profile . Just keep in mind that when you throw out 2 other dimensions, they cannot be restored later. Therefore, the inverse transformation will either be inaccurate or require additional information.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question