recent links: user homepage Ingolf Dahlarticle Advanced Directx examplesuser homepage ArneEideuser homepage MarkSennuser homepage Rbarrerearticle Wiki sandbox pageuser homepage hattonsuser homepage Herbee

From NewWiki

NETLink and Directx

Contents

Introduction

I only realized at the Technology conference in October 2005 the power of NETLink and the fact that it provides a great interface to visualization on the PC.

You can find more advanced examples here:Advanced Directx examples If you start working with Directx and want to help us build a better set of core code, please pick from this list of Mathematica with DirectX wanted code.

You only need Mathematica 5.x which comes with NETLink and a PC setup with Directx 9 and .NET to be able to create 3D graphics with textures, and special effects like you see in today's videogames.

To help everyone understand how this work, I ported the tutorial code from the Directx 9 software development kit from C# to Mathematica.

The examples step you from a drawing a simple triangle to a view of the earth with data created in Mathematica.

Running those examples require a PC with Windows XP and .NET 1.1 as well as Directx 9.

They can all be downloaded at microsoft site.

I suspect that it is possible to do the same with Java, JLink and OpenGL 2.0. If you think you know how to do this, please try, it will be very helpful.

I would like to thank Todd Gayley for his implementation of NETLink and for his support through this experimentation.

There are many ways to improve the attached notebooks. If you download and wish to add comments and explain things further, please do not hesitate to do so.

Luc

Tutorial 1 Devices

It is implied in getting Tutorial 2 to run so I skipped it.

Tutorial 2 Triangles

the result, a flat triangle vertex colorized, looks like this:

you can download the notebook:Triangle.nb.

Tutorial 3 Matrices

the result, a rotating triangle, looks like this:

you can download the notebook:Matrices.nb.

Tutorial 4 Lights

the result, a rotating cylinder under lights, looks like this:

you can download the notebook:Lights.nb.

Tutorial 5 Textures

the result, a fixed cylinder with texture banana texture, looks like this:

you can download the notebook:Textures.nb.

Tutorial 6 Tiger

the result, a tiger displaying with texture tigertexture, looks like this:

you can download the notebook:Tiger.nb.

The notebook also requires the following file Tiger.x

Tutorial Simple shader

the result, our earth displaying with texture earth texture, looks like this:

you can download the notebook:SimpleShader.nb.

The notebook also requires the following files SimpleShader.fx,VertexBufferUtils.dll

Rotating Text in 3D

the result, the word Mathematica extruded in 3D and rotating, looks like this:

you can download the notebook:Text3D.nb.

Contributors to this Page The 1 contributor to this page (ordered by date of first contribution):
User Latest Contribution # Contributions
1. LucB Sun 6 Nov 2005 10:52:06 22

This page was created by LucB on Mon 17 Oct 2005 09:54:40 and last updated by LucB on Sun 6 Nov 2005 10:52:06
Retrieved from NETLink and Directx .
Personal tools