Be the first to rate this file! 40 downloads (last 30 days) File Size: 381.8 KB File ID: #26619

dvcRender

by Binh

 

08 Feb 2010

Code covered by the BSD License  

A physical simulation testbed in Matlab. User friendly OpenGL renderer in Matlab

Download Now | Watch this File

File Information
Description

dvc3d Matlab-OpenGL renderer (2.0)

I) Introduction
This library consists of :
+ OpenTK (a .NET OpenGL wrapper) to provide 3D renderer inside Matlab.
+ Slightly modified version of Bullet 2.75 + C# interface

II) Install

1. Download the zip file
2. Download .NET assemblies here http://www.cs.rpi.edu/~nguyeb2/doku.php?id=dvcrender , you can also get the source and compile them yourself there.
3. Uncompress both files (dvcRender.zip and dvcBinaries.zip) to the same directory.
4. Add dvcRender into Matlab path (the one that contain dvcWorld.m)
5. Change Matlab directory to the one that contain testSampleWorld.m and run it. You should see
two spinning boxes

III) How to control camera
Drag left mouse to rotate
Drag right mouse to change focus point ( you should see a tiny dot at focus point position )
Mouse wheel to move camera in and out (zoom in / out )

iV) Demos
1) testBulletWorld.m : a simple demo (box/plane) using Bullet physics engine
    Things to try out: + after runnning the demo, you can set the box (body1) position to anywhere:
body1.setQ([0 10 0],[0 1 0],0);

setQ function takes 3 parameters: [px py pz] : position
[ax ay az] : axis
a : angle (in degree)
you can also change body1.q directly. body1.q is 7-tuple value with 3x for postion and 4x for its quaternion

2) testSampleWorld.m : a simple demo show how to create your own world by subclassing dvcWorld
    Nothing fancy here, just 2 boxes rotating with different speed

3) testST.m kinda obsolete now, very low level on how to draw body

4) stApp.m my starting place for ST demo ( not done yet )

5) testWorld.m Basic demo show how to draw bodies. Should be the starting place for all projects that dont want to use dvcWorld framework.

V) To do
+ Document matlab code

MATLAB release MATLAB 7.8 (R2009a)
Zip File Content  
Other Files
dvcRender/BulletWorld/BulletBody.m,
dvcRender/BulletWorld/BulletWorld.m,
dvcRender/dvcRender/Assembly/OpenTK.Compatibility.dll.config,
dvcRender/dvcRender/Assembly/OpenTK.dll.config,
dvcRender/dvcRender/Assembly/OpenTK.GLControl.xml,
dvcRender/dvcRender/Assembly/OpenTK.xml,
dvcRender/dvcRender/dvcBody.m,
dvcRender/dvcRender/dvcBTWorld.m,
dvcRender/dvcRender/dvcDrawable.m,
dvcRender/dvcRender/dvcGrid.m,
dvcRender/dvcRender/dvcOGLDrawable.m,
dvcRender/dvcRender/dvcWorld.m,
dvcRender/dvcRender/readObj.m,
dvcRender/dvcRender/render.m,
dvcRender/dvcRender/setupApp.m,
dvcRender/dvcRender/setupViewport.m,
dvcRender/dvcRender/timerFunc.m,
dvcRender/dvcRender/updateCamera.m,
dvcRender/dvcRender/window_function.m,
dvcRender/models/cessna.obj,
dvcRender/models/cube.obj,
dvcRender/models/diamond.obj,
dvcRender/models/gourd.obj,
dvcRender/models/lamp.obj,
dvcRender/models/plane.obj,
dvcRender/Readme.txt,
dvcRender/sampleWorld.m,
dvcRender/stApp.m,
dvcRender/testBullet.m,
dvcRender/testBulletWorld.m,
dvcRender/testSampleWorld.m,
dvcRender/testST.m,
dvcRender/testWorld.m,
license.txt
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
dvc3d Binh 08 Feb 2010 14:25:46
dvcrender Binh 08 Feb 2010 14:25:46
physics Binh 08 Feb 2010 14:25:46
bullet Binh 08 Feb 2010 14:25:46
opengl Binh 08 Feb 2010 14:25:46
3d Binh 08 Feb 2010 14:25:46
mathematics Binh 08 Feb 2010 14:25:46
aerospace Binh 08 Feb 2010 14:25:46
optimization Binh 08 Feb 2010 14:25:46
simulation Binh 08 Feb 2010 14:25:46
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com