1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!--Converted with LaTeX2HTML 99.2beta8 (1.46)
original version by: Nikos Drakos, CBLU, University of Leeds
* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>4.2 Illumination and intensities</TITLE>
<META NAME="description" CONTENT="4.2 Illumination and intensities">
<META NAME="keywords" CONTENT="tutorial">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="LaTeX2HTML v99.2beta8">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="STYLESHEET" HREF="tutorial.css">
<LINK REL="next" HREF="node71.html">
<LINK REL="previous" HREF="node68.html">
<LINK REL="up" HREF="node67.html">
<LINK REL="next" HREF="node71.html">
</HEAD>
<BODY bgcolor="#ffffff">
<!--Navigation Panel-->
<A NAME="tex2html1420"
HREF="node71.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.gif"></A>
<A NAME="tex2html1414"
HREF="node67.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.gif"></A>
<A NAME="tex2html1408"
HREF="node69.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.gif"></A>
<A NAME="tex2html1416"
HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.gif"></A>
<A NAME="tex2html1418"
HREF="node79.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.gif"></A>
<BR>
<B> Next:</B> <A NAME="tex2html1421"
HREF="node71.html">4.3 Color images</A>
<B> Up:</B> <A NAME="tex2html1415"
HREF="node67.html">4. SESSION FOUR</A>
<B> Previous:</B> <A NAME="tex2html1409"
HREF="node69.html">4.1.1 Exercises</A>
  <B> <A NAME="tex2html1417"
HREF="node1.html">Contents</A></B>
  <B> <A NAME="tex2html1419"
HREF="node79.html">Index</A></B>
<BR>
<BR>
<!--End of Navigation Panel-->
<H1><A NAME="SECTION00620000000000000000">
4.2 Illumination and intensities</A>
</H1>
<P>
<A NAME="tex2html250"
HREF="http://www.soest.hawaii.edu/gmt"><B>GMT</B></A> allows for artificial illumination and shading. What this
means is that we imagine an artificial sun placed at infinity in
some azimuth and elevation position illuminating our surface.
The parts of the surface that slope toward the sun should brighten
while those sides facing away should become darker; no shadows are
cast as a result of topographic undulations.
<P>
While it is clear that the actual slopes of the surface and the
orientation of the sun enter into these calculations, there is
clearly an arbitrary element when the surface is not topographic
relief but some other quantity. For instance, what does the slope
toward the sun mean if we are plotting a grid of heat flow anomalies?
While there are many ways to accomplish what we want, <A NAME="tex2html251"
HREF="http://www.soest.hawaii.edu/gmt"><B>GMT</B></A> offers
a relatively simple way: We may calculate the gradient of the surface
in the direction of the sun and normalize these values to fall in
the <IMG
WIDTH="24" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
SRC="img68.gif"
ALT="$\pm1$"> range; +1 means maximum sun exposure and -1 means complete
shade. Although we will not show it here, it should be added that
<A NAME="tex2html252"
HREF="http://www.soest.hawaii.edu/gmt"><B>GMT</B></A> treats the intensities as a separate data set. Thus, while
these values are often derived from the relief surface we want to
image they could be separately observed quantities such as back-scatter
information.
<A NAME="1469"></A>
<A NAME="1470"></A>
<P>
Colors in <A NAME="tex2html253"
HREF="http://www.soest.hawaii.edu/gmt"><B>GMT</B></A> are specified in the RGB system used for computer
screens; it mixes red, green, and blue light to achieve other colors.
The RGB system is a Cartesian coordinate system and produces a color cube.
For reasons better explained in Appendix I in the Reference book it is
difficult to darken and brighten a color based on its RGB values and an
alternative coordinate system is used instead; here we use the HSV system.
If you hold the color cube so that the black and white corners are along
a vertical axis, then the other 6 corners project onto the horizontal plane to
form a hexagon; the corners of this hexagon are the primary colors Red,
Yellow, Green, Cyan, Blue, and Magenta.
The CMY colors are the complimentary colors and are used when paints are
mixed to produce a new color (this is how printers operate; they also add
pure black (K) to avoid making gray from CMY). In this coordinate system the
angle 0-360<IMG
WIDTH="11" HEIGHT="15" ALIGN="BOTTOM" BORDER="0"
SRC="img25.gif"
ALT="$^{o}$"> is the hue (H); the Saturation and Value are harder to
explain. Suffice it to say here that we intend to darken any pure color
(on the cube facets) by keeping H fixed and adding black and brighten it by adding white; for
interior points in the cube we will add or remove gray.
This operation is efficiently done in the HSV coordinate system; hence all
<A NAME="tex2html254"
HREF="http://www.soest.hawaii.edu/gmt"><B>GMT</B></A> shading operations involve translating from RGB to HSV, do the
illumination effect, and transform back the modified RGB values.
<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html1420"
HREF="node71.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.gif"></A>
<A NAME="tex2html1414"
HREF="node67.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.gif"></A>
<A NAME="tex2html1408"
HREF="node69.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.gif"></A>
<A NAME="tex2html1416"
HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.gif"></A>
<A NAME="tex2html1418"
HREF="node79.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.gif"></A>
<BR>
<B> Next:</B> <A NAME="tex2html1421"
HREF="node71.html">4.3 Color images</A>
<B> Up:</B> <A NAME="tex2html1415"
HREF="node67.html">4. SESSION FOUR</A>
<B> Previous:</B> <A NAME="tex2html1409"
HREF="node69.html">4.1.1 Exercises</A>
  <B> <A NAME="tex2html1417"
HREF="node1.html">Contents</A></B>
  <B> <A NAME="tex2html1419"
HREF="node79.html">Index</A></B>
<!--End of Navigation Panel-->
<ADDRESS>
Paul Wessel
2001-04-18
</ADDRESS>
</BODY>
</HTML>
|