Giter Club home page Giter Club logo

opengl_draw_simple's Introduction

运行环境

win + vs15/17

lab 1

1 实现了直线的DDA算法、正负法、Bresenham算法

黄、蓝、红依次代表DDA,正负法和Bradenham方法

2 实现了圆弧的正负法和Bradenham算法

短 bresenham八分弧,长 正负法 四分弧

变形 四分弧

变形 四分弧

3 利用上述完成的算法绘制**象棋的棋盘和棋子

lab 2

1.在lab1_3基础上,自行设计并实现棋盘标志的绘制(如山东大学校徽标志)

2.实现对棋盘标志的平移、旋转和放缩功能 针对平移,放缩和旋转功能只需关心顶点的转换公式:

x = arr[i][0]*k*h+x0;
y = -arr[i][1]*k*h+y0;

K为放缩因子,x0,y0为相对坐标原点。

想要放缩只需要适当改变k的大小,平移需改变和原点的相对距离,旋转则改变x,y的正负。

3 to do

  • 棋子的移动
  • 美化

opengl_draw_simple's People

Contributors

wonderly321 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.