⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stereo.c

📁 Many C samples. It is a good sample for students to learn C language.
💻 C
字号:
/* Stereo Image */
#include <conio.h>
#include <graphics.h>
#include <math.h>

/* 1 / sqrt(2) */
#define FCT 0.7071067
/* he so doi tu do sang radian */
#define RADS 0.017453293

void pars(int a, int b)
{
  line(a, b, a+20, b);
  line(a+20, b, a+20, b+20);
  line(a+20, b+20, a, b+20);
  line(a, b+20, a, b);
  line(a, b, a+20, b);
}

void main()
{
  int gr_drive = DETECT, gr_mode, i;

  initgraph(&gr_drive, &gr_mode, "");
  for (i=-7; i<=7; i++)
  {
    pars(300+30*i, 200);
    line(310 + 30*i, 220, 310+34*i, 250);
    pars(300+34*i, 250);
    line(310+34*i, 270, 310+30*i, 300);
    pars(300+30*i, 300);
  }
  getch();
  closegraph();
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -