A little tricky to learn at first, but I think it fits the description of what your looking for. Link
Do you want source code or an application? For what OS? If you wants a Windows version and have access to Microsoft Visual Studio it's pretty easy to get a DirectX demo that does exactly what you want.