OpenGL 3D graphics in MATLAB



DescriptionTranslated by maninwest@Codeforge Author:roozbehabolpour@CodeProject
In this article we use OpenGL interface for 3D scientific visualization. OpenGL was developed by Silicon Graphics and was released in 1992. OpenGL is a crosslanguage programming interface (API) for rendering 2D and 3D computer graphics. OpenGL is faster and comfortable than virtual reality toolbox. You can make many points in OpenGL with a sphere and you can change these points faster than the virtual reality toolbox. Using the code It is very easy to use this project. In MATLAB you must define points of your object and you must define the adjacency matrix of your mesh. For example suppose that we want to create a spring, first we must define the Points: N=2000; X_points=zeros(N,1); Y_points=zeros(N,1); Z_points=zeros(N,1); Adj=zeros(N,N); for i=1:N X_points(i)=cos(2*pi*5*i/N); Y_points(i)=sin(2*pi*5*i/N); Z_points(i)=(5*i/N2)/4; if i<N Adj(i,i+1)=1; end end Showobject(X_points,Y_points,Z_points,Adj); After you create your object you can zoom in and zoom out with right and left click on your object. Points of Interest You can use this for the finite element method (FEM). FEM is the mathematical approximation method for solving a partially differential equation (PDE). 
Sponsored links
File list
Tips: You can preview the content of files by clicking file names^_^Name  Size  Date 

image.BMP  299.30 kB  20131007 13:57 
Showobject.m  213.00 B  20131007 13:57 
demo.m  298.00 B  20131007 13:57 
Graphics.dll  32.50 kB  20131007 13:57 
Graphics.h  189.00 B  20131007 13:57 
Sponsored links
Comments
(Add your comment, get 0.1 Point)
Minimum:15 words, Maximum:160 words
 1
 Page 1
 Total 1