Hello to all,
I've been reading for a while and I really like this board!
Trying to write File Conversion App within prostart framework
for learning masm32 project.
Below is simple short input file to explain.
I have hack this out in Python but way too slow for large file
of 100-500k.
Could it be possible to zip thru quickly is masm32, and how to
begin to do it correctly? Thanks for reading this!
(Added comments to help explain)

Ascii Input File:
VAGF ;(is STRING) File ok/is valid file
5 5 ;(is LONG) number of nodes (x,y)
0 4 ;(is LONG) x min, x max
0 4 ;(is LONG) y min, y max
0 5 ;(is LONG) z data min, z data max
0 0 0 0 0 ;Col for Row
0 0 0 0 0 ;.... 'z' data (is FLOAT)
0 0 5 0 0 ;..... 'z' data
0 0 0 0 0 ;...... 'z' data
0 0 0 0 0 ;Col for Row

Ascii Output File (x,y,z):
;Note x,y position of z=5 is correct.
0 0 0
1 0 0
2 0 0
3 0 0
4 0 0
0 1 0
1 1 0
2 1 0
3 1 0
4 1 0
0 2 0
1 2 0
2 2 5
3 2 0
4 2 0
0 3 0
1 3 0
2 3 0
3 3 0
4 3 0
0 4 0
1 4 0
2 4 0
3 4 0
4 4 0
Posted on 2002-04-19 17:19:30 by retinitis
you might want to give a bit more info as to what it is exactly that you wish to do :)

It's confusing me.

-H-

:stupid:
Posted on 2002-04-19 21:13:29 by Hiroshimator
Thanks Hiroshimator for reply,

Not sure which part is confusion :)
So, maybe should tell exactly what I want to do...

Data File Format Conversion Utility:

Input file is very large data set of ocean floor depths
gridded and written to input format above. X and Y values
(lat/lon) are Long Integers and Z values (depths) are Floating point numbers.

Output file must be raw triangles for conversion to a 3d format
for display. Very cool if you have seen this for some familiar
body of water :) Or any xyz data you may be of interest.

I think essentially same idea for bitmap to vector
conversion, where pixel positions are X and Y axis values
and pixel value is Z axis. Then create polygon faces for render.

Anyway I guess this sounds pretty confusing and sorry
for this it...

Message board like gun, once fired can't take back :)
Posted on 2002-04-19 23:32:17 by retinitis
You can edit your posts ;)
Posted on 2002-04-20 02:06:38 by grv575
If you've already worked out how to accomplish this in python
(you mentioned that you hacked it together), take some time
to go back and refine your idea, then start to try and see where
you could save some time using assembly language. Focus
on areas of calculation or complicated loops. Once you've gotten
that far, you'll be able to present a few specific questions which
will with no doubt find an answer here (probably not from me
though :) )
Trying to tackle this problem entirely in assembly langauge
right off the bat might take a great deal of time. You'd save
yourself much effort by tuning up your program first, and then
perhaps translating it into assembly later if needed.

I apologize if this responce is vague. I seem incapable of anything but general thought as of late.
Posted on 2002-04-20 09:41:16 by Canite
1. convert each Z float into a point in 3D
2. convert point grid into triangles

These could be done at the same time several orders of magnitude faster than Python. Of course, I've left out the converstion to/from text. Do the triangles have to be in any specific order? It helps to know how to transverse the array of floats. Are you doing this for work/school? Might want to post Python code and what you have in ASM, so far? :)
Posted on 2002-04-20 10:34:28 by bitRAKE
Hmmm, yes I edit my original to say something
very humble with head hanging low, but it's ok :)

this project is only for something to do, just interesting to me for the most part, but may be something useful to learn here.

Hi BitRake,
yes, triangles need to have common boundaries - hypots,
easy to draw with pencil - not so with ascii art.

Ok I have memorymapped input file.

First Five lines describe the structure of the file:
1. must code proc to loop a readline - breaking at crlf
and return the line.
2. must code proc to break lines into num vars at space delim.
3. test for valid file...
4. Now code proc for nested loop of two arrays of float.
a. transpose xy by subscript addition and write output.
b. Then array1 = array2, array2 = get new line...
c. do loop

Some thing like this?
Posted on 2002-04-20 11:11:22 by retinitis