views:

91

answers:

3

I am building a ship simulator that will produce accurate position and orientation values for a prototype hull design in some defined sea-state.

In terms of programming, I have 2 arrays (vectors) in MATLAB containing the position and acceleration values for x, y, z, yaw, pitch and roll. Because the visualisations in MATLAB are a bit crude, I am planning to write a simple server within MATLAB to send these values (at 200Hz) using sockets to another program. The sea is modelled as an array of vertices (think of amplitude snapshots at different timesteps on a sine wave).

So my question is, what's the easiest way to animate a 3D boat and some textured water on screen?

I am only interested in the graphics engine. I have no need for sound, physics, collisions, interface (keyboard, joystick, etc). It should be able to run primarily on Windows, but it would be nice if it could run on Linux and Mac OS too (depending on the additional complexity involved).

A: 

I've found OpenGL pretty easy to use in the past, or if you're on a Windows environment there's Direct3D too.

Jackson Pope
A: 

Not an expert, but few leads are

The above might be called complex and bloated if compared to low level API such as OpenGL, but you have to define what kind of simplicity are you looking for.

For example, "easiest way to animate a 3D boat and some textured water" could mean that you write a clean low level interface directly on top OpenGL API; but as with anything graphics, and especially 3D, I do think that it will not be long before you will start thinking about lights, camera movement, interface, etc... and then you will probably wish for a richer environment.

So, the question is also if you want something really slim and then handle all sort of low level tasks or something that might include much more then you will ever need, but have lot of resources and shortcuts available.

Now, that my rant is finished - I am sure that you'll be able to find an exact example of animation that would take two mesh objects (sea and ship) in OpenGL and display them on screen in any decent OpenGL tutorial.

Unreason
A: 

The easiest way would be to use PANDA3D. it uses python and is quite complete.

Lionel Barret
panda3d is a full blown game engine though isn't it? I just need something to make handling 3d models and altering the viewpoint easy, maybe a bit of shadowing and lighting effects too.
codenoob
yes Panda3d is a game engine, but from your own definition that's what you need, except if you want to recode everything yourself (interesting but much longer and error prone). Go to the site, read a bit of doc and ask on the forum about your specific needs, you're pretty sure to get good advice and prototype in no time.
Lionel Barret