坐标转换和单位转换的函数源代码-coordinate conversion and unit conversion function source code 下载
|
windows下图形的坐标转换,用的是系统内部函数转换的。-windows graphical coordinate conversion, the system is the conversion function. 下载
|
本程序在窗口中显示了一个加入纹理的场景,使得该场景更加真实,平滑,是基于单文档的MFC应用程序。 在本程序中,纹理场景是通过SetCheckTexture()函数生成的,然后通过DoTransform()函数 将—个顶点从物体坐标系转换到窗口坐标系,利用openGL进行矩阵计算,通过UpdateModelView()函数和InitMatrices()函数实现。-the procedures in the window shows a scene by adding texture, making the scene more real, smooth, is based on the MFC single document applications. In this process, the texture scene through SetCheckTexture () function generator, and then through DoTransform () function to-vertex from the object coordinate system conversion to the window frame, using openGL for matrix calculation, UpdateModelView () function and InitMatrices () Function. 下载
|
讲解: 一. 规则: 1.人不允许斜走 2.人不允许走已经走过的地方 二. 屏幕大小:全屏 1024×768 三. 游戏画面 主屏幕: 四. 地图构成: 1.实际坐标:以(0,0)为(0,0)----------------TrueCo 2.逻辑坐标:以(100,100)为(0,0)----------LogCo 3.逻辑块:以10×10的小块--------------LogBlock (一般使用逻辑块) 1.2.3直接的转换作为共有函数. (一个人占4小块) 五. 人员类 #define MAXPLAYER 2 direction=-1//表示停止 人的移动方式:直到人按方向键为之,此人会一直朝一个方向走下去 敌人移动方式:45度撞击 以该物体左上角的坐标为坐标标记 - 下载
|
/* 本程序实现的功能: 显示系统时间和日期 该程序主要操作是: 使用了dos的系统调用功能,输入大小写D显示系统当前日期,当输入大小写T输出当前系统时间,当输入大小写Q退出程序,当输入其他字符时,提示错误 。 主要算法:将系统时间及日期转化成字符显示,通过堆栈来排序显示,同时涉及到 坐标位置设置的转换。时间和日期的显示都只调用了一个(函数)compute,避免了代码的冗余,尽量做到简洁,同时当一次操作过后,程序处于等待状态,以进行下一次操作,而非自动退出。该程序显示时间时多次调用显示功能,以达到动态效果。*/ -/ * This program features : The display system time and date of the program is the main operation : the use of the system call dos function, importation case-D display the current date, case-insensitive T when the input output current system, when the input Q withdraw from the case-sensitive procedure, when losers in other characters, suggesting error. The main algorithm : the system date and time into the characters, sorting through the stack to show that involves strategically placed to coordinate conversion. The time and date shown only a call (functions) compute avoid code redundancy, make it simple as possible, and at the same time after the operation, the procedure waits for the next operation, rather than retire. The program showed multiple calls time display, in order to achieve dy 下载
|
1. 做一个集成的图形界面的程序,可调用每一次作业子程序。 2. 调用画点的函数,用DDA、中点算法画直线和中点算法及正负法画圆和抛物线。 3. 交互式的二维直线求交:如果存在交点,用实心圆显示交点,并用文字显示其坐标。 4. 用动画实现二维图形变换的各种算法,实现对指定形体的平移、旋转和缩放。(包括自行车行走和绕固定点旋转的自旋转物体动画。) 5. 线段裁剪和多边形裁剪算法的动画演示实现。(两种线段裁剪算法和H-S多边形逐边裁剪算法)多边形裁剪算法的动画演示要求先画出一个封闭的多边形,再画矩形的裁剪窗口,然后选择裁剪按钮(或命令),按下“上边裁剪”按钮(或执行“上边裁剪”命令),多边形相对裁剪窗口的上边进行裁剪,显示上边裁剪后的多边形,依此进行其它各边裁剪。 6. 两种扫描多边形扫描转换算法实现(扫描线算法为必做,基于求余运算的边缘填充和边标志算法任选一种); 7. 4连通区域的递归种子填充算法,和扫描线种子填充算法,要求种子点(x,y)可交互输入)。 8. 简单三维图形系统:凸多面体的建模、透视投影,隐藏面的消除及基本图形变换(平移、旋转、缩放)。 9. 交互式Bezier曲线的输入绘制程序实现 -1. So an integrated graphical interface procedures, which call for each operation subroutine. 2. Calling the painting point function, with DDA, the midpoint algorithm painting line and the midpoint algorithm and France Circle and the positive and negative parabola. 3. Interactive 2D linear intersection : If there intersection with a solid circle indicates Nodal and writing to demonstrate its coordinates. 4. Using 2D animation graphics transform algorithms to achieve the specified physical translation, rotation and scaling. (Including walking and cycling around the fixed point of rotating objects from the rotating animation.) 5. Line cutting and polygon clipping algorithm to achieve the animation demo. (Two segments cutting algorithm and H-S-by-side polygon clipping algorithm) polygon clipp 下载
|