CodeBus
www.codebus.net
Search
Sign in
Sign up
Hot Search :
Source
embeded
web
remote control
p2p
game
More...
Location :
Home
Search - 工程代码
Main Category
SourceCode
Documents
Books
WEB Code
Develop Tools
Other resource
Search - 工程代码 - List
[
3D Graphic
]
ThreeDBMP
DL : 0
本人为了图像处理的需要,很想实现二维图像的三维显示,于是写了本代码,希望与此有兴趣的读者共享。图像的获取一是bmp图像文件,二是来自剪贴板。本代码在MFC中调用OpenGL库函数来实现二维图像的三维显示,图像的宽度、高度和象素的亮度分别为三维空间的x,z,y坐标。程序主要有初始化、绘图、资源释放和操作部分,这些功能在OGL_MFCView.cpp文件中实现。OpenGL库的初始化在该文件中的OnCreate,InitScene和 DrawScene函数中实现,主要初始化OpenGL运行时的环境变量,三维物体的光照,材质等,由于介绍OpenGL库的初始化的文档很多,在这里我就不多说了,感兴趣的读者可以参考有关的文档。在DrawScene函数中调用全局函数GLDraw3DBMP完成绘图部分。 编译源代码时,必须把opengl32.lib glu32.lib链到工程中。 可以通过对话框改变材质。按上下箭头键可以实现三维图像的绕x轴旋转,按左右箭头键可以实现三维图像绕z轴旋转。 本代码在Windows2000下编译通过。-I need to in order to image processing and would like to achieve the two-dimensional images of three-dimensional display, so to write this code, and hope that readers who are interested in this share. Bmp image to obtain one image file, two are from the clipboard. The MFC code to call OpenGL library functions to achieve the two-dimensional images of three-dimensional display, the image width, height, and pixel brightness were three-dimensional space, x, z, y coordinates. Main initialization procedure, mapping, resource release and operation of some of these features implemented in the OGL_MFCView.cpp file.
Date
: 2025-12-21
Size
: 105kb
User
:
arechi
[
3D Graphic
]
jingquceliang2
DL : 0
传统计算机语言语法复杂,要求程序员具有较高的编程水平.MATLAB作为一种新兴的计算机语言具有简单易学、代码短小高效、计算功能强大等优点,正日益被广大工程技术及科研人员所接受.介绍了最小二乘法测定点阵参数的数学原理,以及如何利用MATLAB进行编程实现点阵参数的精确测定,并且利用自编的程序测定了贮氢合金LaNi5的点阵参数, 计算结果与现有文献提供数据吻合良好,证明该程序具有较高实用价值.-Traditional computer language syntax complex, requiring the programmer has a high level of programming. MATLAB as a new computer language is simple to learn, the code short and efficient, powerful computing, etc., is increasingly being accepted by the majority of engineering and research personnel. the mathematical theory of least squares method for the determination of the lattice parameter, and how to use MATLAB programming to achieve the accurate determination of the lattice parameter was measured lattice parameters LaNi5 hydrogen storage alloy and use self procedure results with existing literature provide data are in good agreement, to prove that the program has a high practical value.
Date
: 2025-12-21
Size
: 516kb
User
:
李五
CodeBus
is one of the largest source code repositories on the Internet!
Contact us :
1999-2046
CodeBus
All Rights Reserved.