Welcome, Guest. Please login or register.
Did you miss your activation email?
September 05, 2010, 05:33:33 AM
 Code Cortex CommunityCode CortexVideo TutorialsWhere can I learn more about assembly language Graphics?
Pages: [1]
Print
Author Topic: Where can I learn more about assembly language Graphics?  (Read 543 times)
dbjohn
Apprentice
*
Posts: 3


View Profile Email
« on: May 08, 2010, 11:45:46 AM »

I found that the first 2 tutorials were very good. To be honest I thought the third tutorial got too advanced too quickly. Specifically some points I only half understood. It is possible that fairly experienced programmers found it okay as they had a familarity with the concepts. But some of the topics touched require a slower treatment in order for it to be grasped by the beginner. So I was wondering if anyone could recommend an online tutorial or text reference that would cover assembly language graphics or the creator of the video tutorials could share a specific source or reference that covers that area. I can find some tutorials on assembly language on the net but none that cover graphics.
Logged
Neo
Administrator
Adventurer
*****
Posts: 26



View Profile WWW
« Reply #1 on: May 15, 2010, 01:46:03 PM »

Unfortunately, graphics fundamentals seem to be overlooked just about everywhere.  I haven't seen much since the late 90's on drawing in image buffers, and it's pretty useful for generating plots and such, which is one of the reasons I wanted to cover it.

Which points did you find confusing?  e.g. was it the image representation, the function calling, or the condition flags?
Logged

Become one with the code.
dbjohn
Apprentice
*
Posts: 3


View Profile Email
« Reply #2 on: May 16, 2010, 03:12:31 AM »

In the first few minutes the image representation didn't click for me e.g. index(x,y) = y*width+x. What is width, the width of the image we want to put in, the width of the pixels, the width of the fixed number of pixels...? Again I reiterate either the video goes at a slower pace or at least give a reference to online text that makes these details obvious.
Logged
Neo
Administrator
Adventurer
*****
Posts: 26



View Profile WWW
« Reply #3 on: May 16, 2010, 01:02:46 PM »

Okay.  To explain that particular point, the image is just a 2D array of integers.  If a 2D array is stored in a contiguous block of memory in "row-major" order, the corresponding 1D index of the 2D index [row][col] is [row*numCols+col]:

0123...numCols-1
numCols+0numCols+1numCols+2numCols+3...numCols+(numCols-1)
2*numCols+02*numCols+12*numCols+22*numCols+3...2*numCols+(numCols-1)
3*numCols+03*numCols+13*numCols+23*numCols+3...3*numCols+(numCols-1)
..................
(numRows-1)*numCols+0(numRows-1)*numCols+1(numRows-1)*numCols+2(numRows-1)*numCols+3...(numRows-1)*numCols+(numCols-1)

In the case of an image, x=col, y=row, width=numCols, height=numRows.  Would that clear things up?
« Last Edit: May 16, 2010, 01:04:58 PM by Neo » Logged

Become one with the code.
dbjohn
Apprentice
*
Posts: 3


View Profile Email
« Reply #4 on: May 18, 2010, 12:55:49 PM »

Yes that helps. That is what I thought he was trying to say. So index(x,y) is the starting index of the image.
Logged
Neo
Administrator
Adventurer
*****
Posts: 26



View Profile WWW
« Reply #5 on: May 18, 2010, 01:23:49 PM »

When I eventually get around to remaking the videos (probably after Inventor IDE Alpha 6 is finally out), I'll try to remember to clarify it.  Thanks for the input!  Smiley
Logged

Become one with the code.
Pages: [1]
Print
Jump to: