Sample Code: Lorenz attractor
Objective-C to make QuickTime movies
The source code in this sample generates a Lorenz attractor curve in three dimensions. The application creates a movie and a folder or directory of images. The movie consists of views of the Lorenz attractor in four scenes. (1) The curve grows to contain 1000 segments; (2) the curve is viewed by moving the camera around 360°; (3) the curve grows to contain 2000 segments; (4) the curve is again viewed. In addition, about 930 images are placed in a directory. These can be used with VR stitching software to construct two QTVR movies of 450 images each.
The 1000-segment Lorenz attractor in a fixed position
The sample code is designed to be used with Xcode version 2 and later. There are six important source-code files (controller, model and view; implementation and interface (or header). There is also a NIB file which develops a very simple GUI for the movie-making application. Instructions on what must and what may be edited in the sample code files is marked by large, upper-case comments. The code, NIB, etc. are in a Stuffit archive: DOWNLOAD HERE (Macintosh: option-click on this link; Windows: right-click on this link).
Four movies are available: two segments of timeline (ordinary QuickTime) and two QuickTime Virtual Reality (QTVR) segments. These were shown at Ed-Media 2006 (with Lindsay B.H. May), Orlando, Florida.
|
|
|
|
|
|



