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


Updated 8 Feb 2010

View License

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

Cite As

Binh Nguyen (2023). dvcRender (https://www.mathworks.com/matlabcentral/fileexchange/26619-dvcrender), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2009a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Find more on Earth, Ocean, and Atmospheric Sciences in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes