*규*
Bronze개인
팔로워0 팔로우
소개
등록된 소개글이 없습니다.
전문분야 등록된 전문분야가 없습니다.
판매자 정보
학교정보
입력된 정보가 없습니다.
직장정보
입력된 정보가 없습니다.
자격증
  • 입력된 정보가 없습니다.
판매지수
전체자료 1
검색어 입력폼
  • Bresenhem's Line Algorithm 평가B괜찮아요
    #include #include #include /***********************************************************************//* x, y 좌표에 point 생성 *//***********************************************************************/void setPixel (GLint xCoord, GLint yCoord){glBegin (GL_POINTS);glVertex2i(xCoord, yCoord);glEnd ();}/***********************************************************************//* x, y 좌표값 결정 *//***********************************************************************//* Bresenham line-drawing procedure for |m| < 1.0 */void lineBres (int x0, int y0, int xEnd, int yEnd){int dx = fabs (xEnd - x0), dy = fabs(yEnd - y0);int p = 2 * dy - dx;int twoDy = 2 * dy, twoDyMinusDx = 2 * (dy - dx);int x, y;/* Determine which endpoint to use as start position */if (x0 > xEnd) {x = xEnd;y = yEnd;xEnd = x0;}else {x = x0;y = y0;}setPixel (x, y);while (x < xEnd) {x++;if (p < 0)p += twoDy;else {y++;p += twoDyMinusDx;}setPixel (x, y);}}/***********************************************************************//* 직선을 그리기위한 Display Function *//***********************************************************************/void display (void){glClear (GL_COLOR_BUFFER_BIT); /* clear all pixels */glColor3f (1.0, 0.0, 0.0); /* Set line segment color to red */lineBres(40, 50, 160, 120);glFlush ( );/* don't wait! start processing buffered OpenGL routines */}/***********************************************************************//* Display window를 초기화 *//***********************************************************************/void init (void){glClearColor (1.0, 1.0, 1.0, 0.0); /* set clearing color to black */glMatrixMode (GL_PROJECTION); /* initialize viewing values */gluOrtho2D (0.0, 200.0, 0.0, 150.0);}/***********************************************************************//* Declare initial window size, position, and display mode (single buffer and RGBA)./* Open window with "hello" in its title bar. Call initialization routines./* Register callback function to display graphics. Enter main loop and process events./***********************************************************************/void main (int argc, char** argv){glutInit (&argc, argv); /* initialize glut library */glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB); /* set display mode */glutInitWindowPosition (50, 100); /* set window position in screen */glutInitWindowSize (400, 300); /* set window size in pixels */glutCreateWindow ("Bresenhem Line Algorithm"); /* create window with "hello" on its title bar */init ( );/* Execute initialization procedure. */glutDisplayFunc (display);/* specify the function that's called whenever thecontents of the window need to be redrawn */glutMainLoop ( );/* Enter the GLUT processing loop */}
    프로그램소스| 2004.10.02| 3페이지| 1,000원| 조회(680)
    미리보기
전체보기
받은후기 1
1개 리뷰 평점
  • A+최고예요
    0
  • A좋아요
    0
  • B괜찮아요
    1
  • C아쉬워요
    0
  • D별로예요
    0
전체보기
해캠 AI 챗봇과 대화하기
챗봇으로 간편하게 상담해보세요.
2026년 05월 22일 금요일
AI 챗봇
안녕하세요. 해피캠퍼스 AI 챗봇입니다. 무엇이 궁금하신가요?
6:43 오후
문서 초안을 생성해주는 EasyAI
안녕하세요 해피캠퍼스의 20년의 운영 노하우를 이용하여 당신만의 초안을 만들어주는 EasyAI 입니다.
저는 아래와 같이 작업을 도와드립니다.
- 주제만 입력하면 AI가 방대한 정보를 재가공하여, 최적의 목차와 내용을 자동으로 만들어 드립니다.
- 장문의 콘텐츠를 쉽고 빠르게 작성해 드립니다.
- 스토어에서 무료 이용권를 계정별로 1회 발급 받을 수 있습니다. 지금 바로 체험해 보세요!
이런 주제들을 입력해 보세요.
- 유아에게 적합한 문학작품의 기준과 특성
- 한국인의 가치관 중에서 정신적 가치관을 이루는 것들을 문화적 문법으로 정리하고, 현대한국사회에서 일어나는 사건과 사고를 비교하여 자신의 의견으로 기술하세요
- 작별인사 독후감