Bacona Design -- Solutions
Advanced Graphics
-
S4L1 geo <>
A 3 dimensional drawing application based on indexed arrays. Demonstrates hidden faces and shading.
Geodesic image
-
S4L2 createGeodesic <>
This lessons explores automated data creation. Geodesic spheres are based on icosahedrons. Once you have created the icosahedron data set you can use it to create 2, 3, and 4 frequency geodesic data sets.
-
S4L3 Bounce <>
It is fairly easy to model spheres in a gravity field bouncing off of the walls, floor, or ceiling. What is more difficult is making them take up space. This lesson was an experiment to see how to make spheres bounce.
Bounce image
-
S4L4 quadBounce <>
Using the tools developed in the previous lesson we create a more realistic model of a convection cell. Three different bounce algorithms are designed and tested. Data structures were developed, built, tested, and discarded. Still a work in progress with construction clutter everywhere.
binBounce image
-
S4L5 Ecology <>
I wanted to learn how to really use C++ on an application, not on simple example problems. I also wanted to simulate a multi-level ecology. So I created an inheritance tree with both "is a" and "has a " relationships. I implemented many examples of polymorphism, with constructors for the multiple levels of the ecology. From a nutrient layer, to the plant, herbivore, and ultimately the carnivores. Energy flows up, and down again, as the organisms feed, mate, and die. Each organism has a characteristic color. This color is mirrored in the current data points for each species. Genetic operators work at breeding better plants, herbivores, and carnivores for each generation. The fitness function is simple: can the organism survive? If they live the organisms can eat, and may even mate. Otherwise their energy goes to whoever ate them, or if they died, to the nutrient layer directly. The simulation grows more stable after the first 100 generations. The simulation can run for a million generations, or more, after this period of uncertainty.
Ecology image
image
image
image
-
S4L6 matrixGeo <>
I wanted to rewrite the 3D graphics engine into something more compact and useful. So I factored out a few tools. Then I started from scratch, and created a vector/matrix library of tools. Then I rebuilt threeD.c using the new vector tools. These tools let me work at the face level of the scenes, instead of working at the coordinate level for each operation. Vectors and matrices are a more natural way to express graphic objects. Once I built them, the multi-level hierarchy trivially wrote itself. Code became very easy to read, since it matched my mathematical notes. Once I used the tools, I rebuilt them to make them more compact and simpler.
Matrix Geodesic image
-
S4L7 eightFreq <>
This lesson is a work in progress. I successfully built an 8 frequency geodesic sphere data set but the number of duplicate vertices bothered me. I wrote code to cull the excess vertices but that induced errors in face ordering which lead to faulty displays. Too many of the faces were out of order so the hidden face routine failed.
-
S4L8 ecoMenu <>
S4L5 uses the compiler as the user interface. This lesson adds menus and dialog boxes to the simulation. It is a work in progress where I am expressing more of the genes present on the various chromosomes. I may rebuild the entire genetic structure of the system to implement more genetic material. That would allow the ever evolving critters to express behaviors. Having them differ enough to speciate would be ideal.
-
S4L9 matrixThread <>
This lesson combines the producer/consumer threading ideas from S3L11, with the library of vector/matrix tools in matrix.h, and the tools from S4L6 where we simplified the 3D graphics engine. This application displays multiple objects, each rotating independently of the others, while orbiting each other, with the sun orbiting all of them with shading and hidden faces.
Multi-Geodesic image
-
S4L10_matrixVert <> I took the code from previous lessons and created a 3D library, built on top of the vector/matrix library. I wanted a stand alone box of tools to create any 3D animation display. I used it to extend my antenna models from grad school. Instead of rudimentary wire frame images I had antenna radiation patterns with shaded, 3 dimensional solids. Now to add transparency :)
- Section four lessons zipped