Square should be easy...
CenterX and CenterY would be width/2 and height / 2 of square respectively...
you could get 5 points with SIN and COS calls...
360 degrees / 5 = 72
pt1 = 72 * 0 = 0 deg
pt2 = 72 * 1 = 72 deg
pt3 = 72 * 2 = 144 deg
pt4 = 72 * 3 = 216 deg
pt5 = 72 * 4 = 288 deg
rad = pi / 180 (precalculate this and make it a constant)
rad = 0.017453292519943295769236907684886 (pick a precision)
x = centerx + cos(deg * rad) * Radius
y = centery + sin(deg * rad) * Radius
but you could swap them to get the point to point up...
x = centerx + sin(deg * rad) * Radius
y = centery + cos(deg * rad) * Radius
Then there are methods to draw lines and fill between lines in assembly...
You might also look into drawing filled triangles... (used commonly with 3D apps...)
I'll leave writing the assembly to you, for practice...
Basics...
Code:
load the Deg (or calculate) into AX
Multply By rad
Execute sin/cos function on result
multiply result by radius
add result to Center X/Y
push value
repeat for opposite x/y value
repeat for other 4 points
*Note there are examples of all of the above available on the net, if you can Google the right way ;-)
Have Fun, Be Young... Code BASIC
-Josh
PROGRAMMER:
Red-eyed, mumbling mammal capable of conversing with inanimate objects.