开发者

converting 3-d text into 2-d file text

I am having a 512*512 types of file its a x*y type of file . now we are having 512 files of this type . these 512 files are like the z-axis if we have 100 files of this 开发者_StackOverflow社区type then our total vertices are 512*512*100 , in this way I have to read a file is there any algorithm to read files arranged this type and putting into a single 2-d text file.

2-d text file will be like this 000 001 010 011 100 101 110 111 ,in this way we go on printing from the 3-d text file into a single 2-d text file

Is there any way to do that if anyone know please let me know that. any tutorial or any code

Sudhanshu

p.s : if you need any other information about my question you tell me.


Okay, I'm going to parse it this way:

  • You have some files of Type XY:
    • Each one has a 512*512 table.
    • You have Z of these files.
  • You want to turn it into a new type of file, with a 512*512*512 table.

I'll assume that:

  • You know how to perform basic file I/O.
  • You know how to parse your existing file (it has a known delimiter for row/column).

It's surprisingly easy: concatenate the files. You know the length, so you know that every 2^18 entries (or 2^9 rows) represents a X-Y plane at an integer Z-location.

If you're worried about the size changing, then go ahead and choose a new delimiter to represent a new Z-index.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜