With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
The Grade of the Solution
The Zone Rank of the Expert Providing the Solution
The Number of Author and Expert Comments
The Number of Experts Contributing
The Feedback of the Community
Your Input Matters Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.
If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.
hey there, i hope someone can help. the problems im having with my below code include, storing my lines in a data structure, so i can resize my window and have all lines redrawn (not just the last one), its something with the display and mouse functions i think, check it out also, can someone implement a clear function, which clears all lines that were drawn, resetting the line number to 0. My big problem tho is implementing Bresenham's algorithm and the SetPixel function. Im sure my code is correct, i need normal lines to be drawn as pixles on the line when the Bresenham option is selected (with the right mouse button), i hope someone can help me ASAP, ive been at it the last few days and hit a brick wall i think, thanks (by the way, the comments are just code i intended on using but didnt delete yet just in case) u can email me at dak67@uow.edu.au thanks
void myinit() { /* attributes of lines, background, etc */ glClearColor(0.,0.,0.,1.); /* black background */ glColor3f(1.,1.,1.); /* draw in white */ glShadeModel(GL_FLAT); /* set up viewing 500 x 500 window with origin lower left */ glViewport(0,0,ww,wh); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluOrtho2D(0.,(GLdouble)ww,0.,(GLdouble)wh); /* ensure aspect ratio */ glMatrixMode(GL_MODELVIEW); }
void mouse(int btn, int state, int x, int y) { if(btn == GLUT_LEFT_BUTTON && state == GLUT_DOWN) { L[Lnum].xp[icoord] = x/psize; L[Lnum].yp[icoord] = (wh-y)/psize; if (icoord == 0) { icoord++; isline = 0; } else { isline = 1; glBegin(GL_LINES); glVertex2i(L[Lnum].xp[0],L[Lnum].yp[0]); glVertex2i(L[Lnum].xp[1],L[Lnum].yp[1]); glEnd();