|
Plasma generator
Example
of algorithm for generating smoke or clouds using fractals. This
method is used for terrain generation - height corresponds to brightness. Here is
source code. |
|
CIE Chromaticity Diagram
The CIE Chromaticity Diagram is quite important in understanding
a number of color science concepts. This code uses
data of CIE 1931 2-degree observer, but other model can be used
with minimal changes. One implementation is included - determining
color of hot objects (stars etc.)

|
|
Rotated ellipses and sinusoides rendered using
Bezier curves
There is no standard function for rendering rotated ellipses in
Visual Basic or Windows API. It is substituted by not very powerful
computation point by point. The larger resolution, the higher number
of points is required to compute. Problem can rise when we need
fill inner area. There is only slow FloodFill method for doing
this. Here is example how to avoid
these problems using Bezier curves. For any resolution all we need
are eight points. These curves can be easy filled, exported into
WMF format and, in addition, their rendering is hardware accelerated!
Example contains code for rendering sinusoids too.

|
| |