Description: The basics of this program is to develop a simple 2D paint program, similar in function in many respects to MS Paint. provide the user access to the following functions:
Point in this mode, each left mouse down should create a point on the screen
Scribble in this mode, user should be able to draw “freehand” lines with left mouse down
Line in this mode, the user can draw a line between two points selected with two successive clicks of the left mouse button
Rectangle in this mode, the user can draw a rectangle by selecting two opposite corners of the rectangle with two successive clicks of the left mouse button
Clear clear the screen to black
Quit cause the program to exit-this program is very useful for OpenGl beginers Platform: |
Size: 756736 |
Author:jinjuan |
Hits:
Description: BspLines曲线生成
Step1:建立控制点数组;
Step2:设定插值步长、曲线Si的控制点、参数t的取值区间为(0,1);
Step3:用OPENGL画出各控制点及其连线;
Step4:进行插值计算:计算出的若为第一个插值点定位到画图窗口否则画曲线到该点。
-BspLines curve generation Step1: establish control points group Step2: Set interpolation step, the curve control points Si, the parameter values t interval (0,1) Step3: Draw the control points with OPENGL and its connection Step4: interpolation calculation: if the calculated interpolation point positioning for the first one to paint the window or painting curve to that point. Platform: |
Size: 2329600 |
Author:chengyangmao |
Hits: