Hi Andy_A.
Marcos is going to have his own address on monday.
Here´s the problem I need to find a solution for:
1. I have a 50 x 50 bitmap
2. This bitmap contains the noise-free scan of a hand-drawn polygon.
3. The line width ranges from 1 to 5 pixels.
(Different hand-drawn segments can have different widths, in the same bitmap!)
4. I need to scan the bitmap, using your algorythm, which gave me very good results.
5. BUT, The vectors will be used only to find out what the angle for that 10 degrees arc is.
I don´t erase the original pixels and replace them with the line described by the vector.
What I have to do is: for every pixel inside of that 10 degrees arc, I store the angle associated to that pixel, which is exactly the angle of the line segment found to be the resulting vector for that arc.
I hope you understood.
Please, let me know if that was not clear.
It would be great if you could create a function, which I could call and would do this, but it would be even better, if it allowed me to specify some parameters, so that I can change the specs later.
Params would be:
* Box Size (currently 50 pixels, but could be 100, for instance - or 128 pixels, etc...)
* Radar Scan Accuracy (Currently 10 degrees, resulting in 36 vectors, but could be 1 degree, resulting in 360 vectors - or 5 degrees, etc...)
These are the global vars the function would gave to work with:
Dim workBitmap%(50, 50) ; Could be (100, 100)
; for instance.
; Holds the original bitmap
; Each cell is a pixel (0 or 1)
Dim angle%(50, 50) ; Angle to be assigned to each
; pixel in the bitmap, in degrees.
; Integer angles only, ranging from
; 0 to 359 degrees.
So, in a few words, this is what it has to accomplish:
Assign values to the array angle%(50, 50), based on the original bitmap array workBitmap%(50, 50), using your radar algorythm.
It would be nice to be able to specify the size (provided the arrays are DIMed accordingly).
Also, it would be even better if one could specify the angle to be used by the radar algorythm.
Please, understand that this doesn´t have anything to do with the company I work for (i.e. casino games).
I am just asking you to help me figure out how to progress with my game engine.
Thank you *so* much for your help, Andy.
Cheers,
Rui Barbosa Jr.
Marcos is going to have his own address on monday.
Here´s the problem I need to find a solution for:
1. I have a 50 x 50 bitmap
2. This bitmap contains the noise-free scan of a hand-drawn polygon.
3. The line width ranges from 1 to 5 pixels.
(Different hand-drawn segments can have different widths, in the same bitmap!)
4. I need to scan the bitmap, using your algorythm, which gave me very good results.
5. BUT, The vectors will be used only to find out what the angle for that 10 degrees arc is.
I don´t erase the original pixels and replace them with the line described by the vector.
What I have to do is: for every pixel inside of that 10 degrees arc, I store the angle associated to that pixel, which is exactly the angle of the line segment found to be the resulting vector for that arc.
I hope you understood.
Please, let me know if that was not clear.
It would be great if you could create a function, which I could call and would do this, but it would be even better, if it allowed me to specify some parameters, so that I can change the specs later.
Params would be:
* Box Size (currently 50 pixels, but could be 100, for instance - or 128 pixels, etc...)
* Radar Scan Accuracy (Currently 10 degrees, resulting in 36 vectors, but could be 1 degree, resulting in 360 vectors - or 5 degrees, etc...)
These are the global vars the function would gave to work with:
Dim workBitmap%(50, 50) ; Could be (100, 100)
; for instance.
; Holds the original bitmap
; Each cell is a pixel (0 or 1)
Dim angle%(50, 50) ; Angle to be assigned to each
; pixel in the bitmap, in degrees.
; Integer angles only, ranging from
; 0 to 359 degrees.
So, in a few words, this is what it has to accomplish:
Assign values to the array angle%(50, 50), based on the original bitmap array workBitmap%(50, 50), using your radar algorythm.
It would be nice to be able to specify the size (provided the arrays are DIMed accordingly).
Also, it would be even better if one could specify the angle to be used by the radar algorythm.
Please, understand that this doesn´t have anything to do with the company I work for (i.e. casino games).
I am just asking you to help me figure out how to progress with my game engine.
Thank you *so* much for your help, Andy.
Cheers,
Rui Barbosa Jr.