Giải thuật sinh đường Ellipse

Người đăng: vuivengay on Thứ Năm, 29 tháng 8, 2013

#include <graphics.h>#include <conio.h>#define ROUND(a) ((long)(a+0.5))void plot(int xc, int yc, int x, int y, int color){      putpixel(xc+x, yc+y, color);      putpixel(xc-x, yc+y, [...]
More about

Các giải thuật sinh đường tròn trong C/C++

Người đăng: vuivengay

1. Giải thuật sinh đường tròn Bresenham:void Bre_circle(int xc, int yc, int Radius, int color) {      int x, y, p;      x = 0;      y = Radius;   [...]
More about

Các thuật toán vẽ đoạn thẳng trong C/C++

Người đăng: vuivengay on Thứ Bảy, 17 tháng 8, 2013

1. Thuật toán vẽ đoạn thẳng thông thường: void dline(int x1,int y1, int x2,int y2, int color) {    float y;    int x;    for (x=x1; x<=x2; x++) {   [...]
More about

Code C-C++: Bài toán Tháp Hà Nội

Người đăng: vuivengay on Chủ Nhật, 4 tháng 8, 2013

#include <graphics.h>#include <stdlib.h>#include <stdio.h>#include <conio.h>#define MAX 12#define BegPos   105#define AuxPos   305#define EndPos   505int width;typedef struct disc [...]
More about