首页 | 官方网站   微博 | 高级检索  
相似文献
 共查询到19条相似文献,搜索用时 187 毫秒
1.
以圆为单位显示/消隐图像 putimagepixel()函数,即在屏幕上坐标(x,y)处写图像块imgbuf中相应的像素(x,y)的函数,给我们的特技制作开辟了广阔的应用前景。因为几乎所有的几何图形都可以用putpixel()函数实现,而凡是可以用putpixel()函数生成的图形,都可以用putimagepixel()函数进行形如该生成图形的图像特技显示/清屏。这里仅以圆为例,介绍putimagepixel()函数的特技应用技巧,读罢此文,相信你能自如地编写椭圆、圆弧等特技显示了。 下面先简单介绍一下圆的算法: 最常见的圆的算法是Bresenham算法。圆的坐标方程为x~2+y~2=R~2(椭圆为x~2+(a/b*y)~2=a~2),考虑以坐标原点为圆心(当圆心不在坐标原点时,可以通过坐标平移变换来实现),并按顺时针方向生成圆,  相似文献   

2.
前言等值线是一种数、形兼备,用途极广的工程上常用的图形。若由手工绘制,要花费很多时间,而且图形质量也会因人经验的多寡而变化。本文的目的是探讨如何由计算机自行绘制或图显等值线图的方法,据此编制的程序紧接文献的有限元分析程序,作计算机图形处理,绘制涡轮叶片的等应力线图形。若将给定的平面区域划分有限个网格,根据网格点上的不同函数值z=f(x,y),可以拟合成一个光滑的空间曲面,以z的不同量级常数值c,求解c=f(x,y)(相当于用z=c的平面去截取空间曲面所得的交  相似文献   

3.
在画三维物体的图形时,我们遇到的新问题是,物体表面上的点的坐标具有三个分量(x,y,z),而屏幕上象素的坐标只有两个分量(xp,yp)。因此需要给出两组坐标分量之间的对应关系:xp=f(x,y,z),yp=g(x,y,z)。  相似文献   

4.
本文以有限元法产生的离散解为背景给出一个简单的绘制等值线的算法,稍加修改也可应用于任意离散数据点集的情况。对于任意离散数据点集的情况我们将在以后讨论。 不失一般性,我们只考虑三角形元。设在每个三角形上,已知拟合曲面z=f(x,y)。下面讨论两种算法。 1.三角剖分法 将三角形剖分为若干个小三角形(比较简单的分法是分为相似三角形)。设拟合曲面z=f(z,y)在小三角形的每个边上可看作线性函数。计算小三角形各顶点上的z值,用线性插值法计算等值线的交点.由于线性化的假设,等高线若经过小三角形的一边,则必  相似文献   

5.
本文介绍了二元函数z=f(x,y)以及F(x,y,z)=0的MATLAB软件编程作图的一些方法。其中,数学分析中的多元函数化参法在此作图过程中起到了重要作用。同时本文还将此作图法运用于实际物理问题的数学模型作图中,尤其是数学物理方程组解的作图,推广了数学分析的数形结合思想在实际建模问题中的应用。  相似文献   

6.
本文探讨了针对Z=f(x,y)型三维曲面图形的投影画法中,一种改进的利用封锁技术消除隐藏线的算法。并对文献[1]中的原始算法和本文的改进算法所产生的图形结果作了比较及讨论。  相似文献   

7.
本文给出一种在屏幕上快速显示函法 Z=F(x,y)曲面的三维网状消隐图形的方法。此法与传统的比较曲面上的点与视点间距离的方法相比,生成消隐图形所需的时间被大大缩短。该方法简便易懂,在微机上很容易实现,具有广泛的实用性。  相似文献   

8.
三维空间坐标的旋转算法   总被引:1,自引:0,他引:1  
在进行三维空间图形的显示以及动画处理时,经常需要对图形进行旋转处理。旋转可分为绕坐标轴的旋转以及绕任意轴的旋转。三维空间中的坐标点(x,y,z)经过旋转后其坐标值变换为(x′,y′,z′)。本文讨论(x′,y′,z′)与(x,y,z)之间的坐标变换关系。  相似文献   

9.
利用计算机三维图形学技术,可在计算机屏幕上从不同的角度显示二元函数的三维图形。文献[1]中提出了有消隐的二元函数的三维绘图算法,但其图形是条状的。文献[2]中提出了一个二元函数的三维绘图程序,其图形是网格状的,但是没有消隐。对于较复杂的二元函数,由于隐线没有被消除,此方法将造成图形的层次不清楚。本文提出了一个二元函数的三维网格图形的绘制算法,并在IBM PC/XT机上编程实现。此算法能够消除隐线,由于图形是网格状的,它的立体感较强,而且由此可忽略一些较费时的状态判别及有关的计算。对于某些复杂的函数,本文的方法比文献[1]中的方法更省时间。  相似文献   

10.
设空间区域 Ω={(x,y,z)|α≤x≤b,φ_1(x)≤y≤φ_2(x),φ_1(x,y)≤z≤φ_2(x,y)}。(1)f(x,y,z)在Ω及其邻域内具有四阶连续偏导数,φ_1(x)与φ_2(x)在[α,a]内可导,φ_1(x,y)与φ_2(x,y)在Ω的投影(xoy面)区域上具有连续偏导数。下面介绍三重积分 I=∫∫∫f(x,y,z)dxdydz (2)的优化复化Simpson数值积分算法。首先将Ω进行划分,把[α,b]分为2m等分,步长与分点为 h_1=(b-α) /2m,x_i=α+ih_1(i=0,1,2,…,2m)。 (3)在x_(2i+1)处把[φ_1(x_(2i+1)),φ_2(x_(2i+1))分为2n等分,步长与分点为 g_(1,2i+1) =((φ_2(x_(2i+1)))-(φ_1(x_(2i+1))))/2n (i=o,1,2,…,m-1), (4) y_(2i+1,j)=φ_1(x_(2i+1))+jg_(1,2i+1) (j=0,1,2,…,2n)。  相似文献   

11.
This paper proposes an efficient direct imaging algorithm for constructing iso-surfaces from regular and rectilinear 3D grid data in scientific and engineering visualization. The basic idea is to generate and draw polygons simultaneously by processing the cells spanned by grids in decreasing order of distance from the current viewpoint. Iso-surfaces are generated in five or six tetrahedrons into which the cells are subdivided, and are sent to a graphics device or drawn into a frame buffer on the fly. The execution order of each of the tetrahedrons is identical and is determined by the current viewpoint. Since the algorithm does not need to store intermediate polyhedral data and does not require a depth buffer memory for hidden surface removal, it is applicable to a large quantity of data on a 3D grid, such as computed tomography (CT) data. It is also particularly powerful for semi-transparent display, because transparency calculation can be reduced to image compositing operations if the polygons are drawn in order of their z-depth from the current viewpoint.  相似文献   

12.
On generating topologically consistent isosurfaces from uniform samples   总被引:9,自引:0,他引:9  
A set of sample points of a function of three variables may be visualized by defining an interpolating functionf of the samples and examining isosurfaces of the formf(x, y, z)=t for various values oft. To display the isosurfaces on a graphics device, it is desirable to approximate them with piecewise triangular surfaces that (a) are geometrically good approximations, (b) are topologically consistent, and (c) consist of a small number of triangles. By topologically consistent we mean that the topology of the piecewise triangular surface matches that of the surfacef(x, y, z)=t, i.e., the interpolantf determines both the geometry and the topology of the piecewise triangular surface. In this paper we provide an efficient algorithm for the case in whichf is the piecewise trilinear interpolant; for this case existing methods fail to satisfy all three of the above conditions simultaneously.  相似文献   

13.
We present an approach to visualizing particle-based simulation data using interactive ray tracing and describe an algorithmic enhancement that exploits the properties of these data sets to provide highly interactive performance and reduced storage requirements. This algorithm for fast packet-based ray tracing of multilevel grids enables the interactive visualization of large time-varying data sets with millions of particles and incorporates advanced features like soft shadows. We compare the performance of our approach with two recent particle visualization systems: one based on an optimized single ray grid traversal algorithm and the other on programmable graphics hardware. This comparison demonstrates that the new algorithm offers an attractive alternative for interactive particle visualization.  相似文献   

14.
A new approach to plotting z=f(x,y) from a table of z over a regular x?y grid is explained in comparison with other hidden-line methods. Its application to drawing crosshatched and simple outline pictures of surfaces is described.  相似文献   

15.
立体几何教学软件中的一个线消隐算法   总被引:1,自引:0,他引:1  
立体几何教学软件要求场景中的几何体具有真实感,几何体被遮挡的边要随着视点的改变动态地以虚线形式输出,这与传统黑板教学中教师将几何体被遮挡的边画成虚线是一致的,符合学生的学习习惯,易于理解和接受。对三维立体场景中有名的线消隐算法——Roberts算法进行了研究并作了改进,在提高效率的同时将它与一定的数据结构相结合,实现了一种满足立体几何教学软件中把隐藏线以虚线形式输出的特殊要求的线消隐算法。经测试证明此算法是完全可行的。  相似文献   

16.
17.
Visiting triangles that conform a digital terrain model is a core operation in a number of fields like animation and video games or generating profiles, cross-sections, and contours in civil engineering. Performing the visit in an efficient manner is an issue specially when the output of the traversal depends in some way on additional parameters or information changing over time, for example, a moving point of view. In this work we report a set of rules that, given a digital terrain model defined over a regular grid and an arbitrary point of view outside the terrain, define a total back-to-front order in the set of digital terrain model triangles with respect to the point. The set of rules is minimal, complete and correct. To assess how the rules perform, we have implemented a CPU-based algorithm for realistically rendering height fields defined over regular grids. The algorithm does not make use of the z-buffer or shaders featured by our graphics card. We show how our algorithm is implemented and show visual results obtained from synthetic and real data. We further discuss the algorithm performance with respect to two algorithms: a naive algorithm that visits triangles according to grid indices and does not solve the hidden line problem, and the z-buffer provided by the graphics card featured by our computer. Our algorithm allows real-time interaction when the point of view arbitrarily moves in 3D space and we show that its performance is as good as that of the z-buffer graphics card.  相似文献   

18.
霍夫变换在幂函数型曲线检测中的应用   总被引:2,自引:0,他引:2  
利用霍夫变换抗噪声能力强和能分离出属于不同直线附近点的特性,研究离散数据点集M中xi,yi满足幂函数关系时的曲线检测问题。首先,对离散数据点集M中的数据xi,yi作对数变换,得到新的数据点集M(xi,yi),此时,xi,yi具有线性关系;其次,用霍夫变换检测M中的直线,可得直线参数;然后,利用霍夫变换所得的直线参数,计算图象中的边缘点到直线的距离dki,并与给定阈值dk比较,从而将分布在不同直线附近的点分离出来,同时剔除数据点集M中的干扰点或噪声;最后,用最小二乘法拟合直线,得到剔除干扰点或噪声后的拟合曲线方程参数a和b。  相似文献   

19.
各种文档中经常包含有各种特殊作用的横线、手划线等,当这些文档通过扫描等数字化方式存入计算机并需要进一步识别处理成文字编码时,这些线条却成为OCR的干扰因素,降低了文档内容的识别率.为此,本文提出一种新的文档干扰线去除算法,先将文档图像二值化,二值化过程考虑了不均匀光照带来的影响;然后将前景细化为单像素,减少线条粗细造成的影响;接着通过一种改进的贪婪算法计算横、竖两个方向线段的权重,判断权重较高的线段为干扰线;最后通过与干扰线距离的大小判断图像中每个前景像素的归属,从而获得一个完整的文档恢复图.仿真实验表明,本文提出的算法能够有效去除干扰线,特别在干扰线与文字粘连的情况下,去除干扰线的同时较少地影响文档图像的质量,且具有较高的计算速度和较好的去除效果,为图像进一步OCR识别提供了良好的基础.  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司    京ICP备09084417号-23

京公网安备 11010802026262号