Graphics Reference
In-Depth Information
9. In the morphing examples, the “correct” range of values for uBlend is
[0.,1.]. What happens if uBlend < 0.? What happens if uBlend > 1.? Can
you explain why you end up with these shapes?
10. Experiment with the Circle 2 algorithm by using a power other than 2 for
the distance computation. How does that affect the images?
11. Use texture coordinates on an object to computer a Circle 2 texture directly
on the surface of the teapot.
12. Change the color transfer function in the Circle 2 algorithm and notice the
difference in the images you produce. Compare a relatively monochro-
matic transfer function (a simple grayscale, for example, or a black → red
→ yellow → white range) to a very chromatic function (a full rainbow
scale, for example) and note the changes in the paterns.
13. Modify the cube morphing to produce spherical morphing as we showed
in Figure 16.27. How many other variations can you come up with?
14. Investigate another kind of algorithmic art (probably 2D) that you can
find. This can come from the 2D fractal world (look at the literature based
on the Mandelbrot or Julia sets), from simulating surfaces as described in
Chapter 7, or from general searches on “algorithmic art.” If it's really cool,
let us know via the topic's website.
15. Implement the “moving pixels” shader to see how it works. Create dif-
ferent kinds of mask textures, with different text, different fonts, or with
different shapes. Try this with a color white noise (available with the
book's materials as randomColor.bmp ) to test whether color noise carries
the motion information as well as the monochrome noise.
16. Figure 16.32 doesn't just show points; it shows light-shaded points.
Modify the given explosion geometry shader to compute a light intensity
for each point, which will then be picked up and used by the fragment
shader.
Search WWH ::




Custom Search