So what did you bring back from the states ?

I don’t know about you, but I have a weakness for Mountain-Dew and Cherry-Coke.

Unfortunately for me they don’t bother making them here as me and my dog would be the only customers.

Nevertheless I had to take action, here’s the result of my last trip to the states:

CSkypeWnd, code for interacting with Skype

I wrote a small WTL class called CSkypeWnd some time ago and didn’t get a chance to use it.

The class works with the public Skype API to allow you (to mention a few) :

  • Initiate / Answer calls.
  • Get/Set the currently use sound-device (usefull).
  • Get information about contacts.

The class is easily portable to a framework like MFC or just plain Win32.

You can download the code here : OhadSkypeExample.zip.

Any changes/comments would be greatly apprechiated.

If you need the WTL headers you can get them here.

OpenGL Terrain Engine

Update: iPad version released

I started working on a terrain engine around October 2000. I was deeply moved by screenshots from black and white :)

My intention and main goal was to create something visually stunning. This meant writing a terrain texture-generator, and working hard to find good textures and blending modes.

The outcome is an engine that hold a (supposedly) 1km by 1km piece of terrain with very high accuracy. There is no triangle-cutting algorithm employed, simple brute-force. I use a large terrain texture and a tiling detail texture. There’s a skybox and the terrain reflects on the water.

I used OpenGL for this one, employing the OGLC skeleton to avoid most of the opengl-win32 business.

You can move through this world using descent keys (a,z, keypad). use ‘w’ to switch to wire-frame and ‘d’ to render without the detail texture.

A few screenshots:

Downloads :

Binary (win32) + Source: terrain engine.zip (compile in debug, release gives problems :)

Thanks :

Yoni Lavi – dynamic camera and general coordinate-system fixups.
The OpenGL Challenge – OpenGL skeleton-app.
Dan Gonzalez Rodriguez – terrain texture generator (CKCed) and figuring out the correct blending mode for the detail-texture.

PQTorus

The PQ-Torus, or PQ-Torus Knot, is a parameterized version of the well-known Torus (A donut-like geometrical shape).P and Q are two parameters we use to modify the toruse’s shape.

The first place I saw a PQ-Torus at was : http://www.blackpawn.com/texts/pqtorus/default.html, they have some nice screenshots and a downloadable implementation of their PQ-Torus.

There is a small toolbar through which you can control the toruses’ parameters, including P, Q, Radiuses and Texturing mechanism.

I used my own approach to generate Normals for my Torus in real-time, which allows real-time wiggling, jiggling and morphing of the torus.

The nicest feature is the ability to shift P/Q values and watch the torus morph from one state to another.

Downloads:

Binary (win32): pqtorus.zip

Mini-Tracer & Life-Saver

Following are two screen-savers.

One implements Conway’s game of life, and the other does Recursive Sphere Ray-tracing.

The ray-tracer can be run in ‘application mode’ as well, but it’s pretty nice as a screen-saver.

The spheres are lighted using Phong illumination, including Specular-Highlights, recursion level is limited to your stack, or in other words none

Downloads :

Life Screen-Saver (Source + Win32 Binary) : life_saver.zip
Sphere Tracer (Source + Win32 Binary) : mini_tracer.zip