This file is indexed.

/usr/share/doc/racket/images/Overview.html is in racket-doc 6.7-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>4.1&nbsp;Overview</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,&quot;tocview_0&quot;);">&#9658;</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x">Images</a></td></tr></table></div><div class="tocviewsublisttop" style="display: none;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1&nbsp;</td><td><a href="Icons.html" class="tocviewlink" data-pltdoc="x">Icons</a></td></tr><tr><td align="right">2&nbsp;</td><td><a href="Logos.html" class="tocviewlink" data-pltdoc="x">Logos</a></td></tr><tr><td align="right">3&nbsp;</td><td><a href="Embedding_Bitmaps_in_Compiled_Files.html" class="tocviewlink" data-pltdoc="x">Embedding Bitmaps in Compiled Files</a></td></tr><tr><td align="right">4&nbsp;</td><td><a href="flomap_title.html" class="tocviewselflink" data-pltdoc="x">Floating-<wbr></wbr>Point Bitmaps</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,&quot;tocview_1&quot;);">&#9660;</a></td><td>4&nbsp;</td><td><a href="flomap_title.html" class="tocviewlink" data-pltdoc="x">Floating-<wbr></wbr>Point Bitmaps</a></td></tr></table><div class="tocviewsublist" style="display: block;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">4.1&nbsp;</td><td><a href="" class="tocviewselflink" data-pltdoc="x">Overview</a></td></tr><tr><td align="right">4.2&nbsp;</td><td><a href="Struct_Type_and_Accessors.html" class="tocviewlink" data-pltdoc="x">Struct Type and Accessors</a></td></tr><tr><td align="right">4.3&nbsp;</td><td><a href="Conversion_and_Construction.html" class="tocviewlink" data-pltdoc="x">Conversion and Construction</a></td></tr><tr><td align="right">4.4&nbsp;</td><td><a href="Component_Operations.html" class="tocviewlink" data-pltdoc="x">Component Operations</a></td></tr><tr><td align="right">4.5&nbsp;</td><td><a href="Pointwise_Operations.html" class="tocviewlink" data-pltdoc="x">Pointwise Operations</a></td></tr><tr><td align="right">4.6&nbsp;</td><td><a href="Gradients_and_Normals.html" class="tocviewlink" data-pltdoc="x">Gradients and Normals</a></td></tr><tr><td align="right">4.7&nbsp;</td><td><a href="Blur.html" class="tocviewlink" data-pltdoc="x">Blur</a></td></tr><tr><td align="right">4.8&nbsp;</td><td><a href="Resizing.html" class="tocviewlink" data-pltdoc="x">Resizing</a></td></tr><tr><td align="right">4.9&nbsp;</td><td><a href="Compositing.html" class="tocviewlink" data-pltdoc="x">Compositing</a></td></tr><tr><td align="right">4.10&nbsp;</td><td><a href="Spatial_Transformations.html" class="tocviewlink" data-pltdoc="x">Spatial Transformations</a></td></tr><tr><td align="right">4.11&nbsp;</td><td><a href="Effects.html" class="tocviewlink" data-pltdoc="x">Effects</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,&quot;tocview_2&quot;);">&#9658;</a></td><td>4.1&nbsp;</td><td><a href="" class="tocviewselflink" data-pltdoc="x">Overview</a></td></tr></table><div class="tocviewsublistbottom" style="display: none;" id="tocview_2"><table cellspacing="0" cellpadding="0"><tr><td align="right">4.1.1&nbsp;</td><td><a href="#%28part._.Motivation%29" class="tocviewlink" data-pltdoc="x">Motivation</a></td></tr><tr><td align="right">4.1.2&nbsp;</td><td><a href="#%28part._flomap~3aconceptual%29" class="tocviewlink" data-pltdoc="x">Conceptual Model</a></td></tr><tr><td align="right">4.1.3&nbsp;</td><td><a href="#%28part._flomap~3aopacity%29" class="tocviewlink" data-pltdoc="x">Opacity (Alpha Components)</a></td></tr><tr><td align="right">4.1.4&nbsp;</td><td><a href="#%28part._flomap~3alayout%29" class="tocviewlink" data-pltdoc="x">Data Layout</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><span class="tocsublinknumber">4.1.1<tt>&nbsp;</tt></span><a href="#%28part._.Motivation%29" class="tocsubseclink" data-pltdoc="x">Motivation</a></td></tr><tr><td><span class="tocsublinknumber">4.1.2<tt>&nbsp;</tt></span><a href="#%28part._flomap~3aconceptual%29" class="tocsubseclink" data-pltdoc="x">Conceptual Model</a></td></tr><tr><td><span class="tocsublinknumber">4.1.3<tt>&nbsp;</tt></span><a href="#%28part._flomap~3aopacity%29" class="tocsubseclink" data-pltdoc="x">Opacity (Alpha Components)</a></td></tr><tr><td><span class="tocsublinknumber">4.1.4<tt>&nbsp;</tt></span><a href="#%28part._flomap~3alayout%29" class="tocsubseclink" data-pltdoc="x">Data Layout</a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;6.7&quot;, &quot;../&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }"/></form>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.7&quot;);">top</a></span><span class="navright">&nbsp;&nbsp;<a href="flomap_title.html" title="backward to &quot;4 Floating-Point Bitmaps&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="flomap_title.html" title="up to &quot;4 Floating-Point Bitmaps&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<a href="Struct_Type_and_Accessors.html" title="forward to &quot;4.2 Struct Type and Accessors&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div><h4 x-source-module="(lib &quot;images/scribblings/images.scrbl&quot;)" x-source-pkg="images-doc" x-part-tag="&quot;Overview&quot;">4.1<tt>&nbsp;</tt><a name="(part._.Overview)"></a>Overview</h4><p><div class="SIntrapara">Contents:
</div><div class="SIntrapara"><table cellspacing="0" cellpadding="0"><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="#%28part._.Motivation%29" class="toclink" data-pltdoc="x">4.1.1<span class="hspace">&nbsp;</span>Motivation</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="#%28part._flomap~3aconceptual%29" class="toclink" data-pltdoc="x">4.1.2<span class="hspace">&nbsp;</span>Conceptual Model</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="#%28part._flomap~3aopacity%29" class="toclink" data-pltdoc="x">4.1.3<span class="hspace">&nbsp;</span>Opacity (Alpha Components)</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="#%28part._flomap~3alayout%29" class="toclink" data-pltdoc="x">4.1.4<span class="hspace">&nbsp;</span>Data Layout</a></p></td></tr></table></div></p><h5 x-source-module="(lib &quot;images/scribblings/images.scrbl&quot;)" x-source-pkg="images-doc" x-part-tag="&quot;Motivation&quot;">4.1.1<tt>&nbsp;</tt><a name="(part._.Motivation)"></a>Motivation</h5><p><div class="SIntrapara">There are three main reasons to use flomaps:
</div><div class="SIntrapara"><ul><li><p><span style="font-weight: bold">Precision.</span>
 A point in a typical bitmap is represented by a few bytes, each of which can have one of 256 distinct values.
 In contrast, a point in a flomap is represented by double-precision floating-point numbers, typically between <span class="RktVal">0.0</span> and <span class="RktVal">1.0</span> inclusive.
 This range contains about 4.6 <span style="font-style: italic">quintillion</span> (or 4.6&#215;10<span style="vertical-align: super; font-size: 80%">18</span>) distinct values.
 While bytes are fine for many applications, their low precision becomes a problem when images are repeatedly operated on, or when their values are built by adding many small amounts&#8212;<wbr></wbr>which are often rounded to zero.</p></li><li><p><span style="font-weight: bold">Range.</span>
 A floating-point value can also represent about 4.6 quintillion distinct intensities above saturation (<span class="RktVal">1.0</span>).
 If distinguishing oversaturated values is important, flomaps have the range for it.
 Further, floating-point images are closed under pointwise arithmetic (up to floating-point error).</p></li><li><p><span style="font-weight: bold">Speed.</span>
 The <a href="flomap_title.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">images/flomap</span></a> module benefits greatly from Typed Racket&rsquo;s type-directed optimizations.
 Even getting individual color values&#8212;<wbr></wbr>interpolated between points, if desired&#8212;<wbr></wbr>is fast.</p></li></ul></div><div class="SIntrapara">For these reasons, other parts of the <span class="RktSym">images</span> library use flomaps internally, to represent and operate on
RGB and ARGB images, light maps, shadow maps, height maps, and normal maps.</div></p><h5 x-source-module="(lib &quot;images/scribblings/images.scrbl&quot;)" x-source-pkg="images-doc" x-part-tag="&quot;flomap:conceptual&quot;">4.1.2<tt>&nbsp;</tt><a name="(part._flomap~3aconceptual)"></a>Conceptual Model</h5><p>A flomap is conceptually infinite in its width and height, but has nonzero values in a finite rectangle starting at coordinate <span class="RktVal">0</span> <span class="RktVal">0</span>
and extending to its width and height (exclusive).
A flomap is <span style="font-weight: bold">not</span> conceptually infinite in its components because there is no natural linear order on component coordinates, as the meaning of components depends on programmer intent.</p><p><div class="SIntrapara">The following example creates a 10&#215;10 bitmap with RGB components, and indexes its top-left red value and two values outside the finite, nonzero rectangle.
It also attempts to index component <span class="RktVal">3</span>, which doesn&rsquo;t exist.
Note that <span class="RktSym"><a href="Struct_Type_and_Accessors.html#%28def._%28%28lib._images%2Fflomap..rkt%29._flomap-ref%29%29" class="RktValLink" data-pltdoc="x">flomap-ref</a></span> accepts its coordinate arguments in a standard order: <span class="RktSym">k</span> <span class="RktSym">x</span> <span class="RktSym">y</span> (with <span class="RktSym">k</span> for <span style="font-weight: bold">k</span>omponent).
</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktSym">magenta-fm</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="Conversion_and_Construction.html#%28def._%28%28lib._images%2Fflomap..rkt%29._make-flomap%2A%29%29" class="RktValLink" data-pltdoc="x">make-flomap*</a></span><span class="hspace">&nbsp;</span><span class="RktVal">10</span><span class="hspace">&nbsp;</span><span class="RktVal">10</span><span class="hspace">&nbsp;</span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">0.5</span><span class="hspace">&nbsp;</span><span class="RktVal">0.0</span><span class="hspace">&nbsp;</span><span class="RktVal">1.0</span><span class="RktVal">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="Conversion_and_Construction.html#%28def._%28%28lib._images%2Fflomap..rkt%29._flomap-~3ebitmap%29%29" class="RktValLink" data-pltdoc="x">flomap-&gt;bitmap</a></span><span class="hspace">&nbsp;</span><span class="RktSym">magenta-fm</span><span class="RktPn">)</span></td></tr><tr><td><p><img src="pict_125.png" alt="image" width="10" height="10"/></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="Struct_Type_and_Accessors.html#%28def._%28%28lib._images%2Fflomap..rkt%29._flomap-ref%2A%29%29" class="RktValLink" data-pltdoc="x">flomap-ref*</a></span><span class="hspace">&nbsp;</span><span class="RktSym">magenta-fm</span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">(flvector 0.5 0.0 1.0)</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="Struct_Type_and_Accessors.html#%28def._%28%28lib._images%2Fflomap..rkt%29._flomap-ref%2A%29%29" class="RktValLink" data-pltdoc="x">flomap-ref*</a></span><span class="hspace">&nbsp;</span><span class="RktSym">magenta-fm</span><span class="hspace">&nbsp;</span><span class="RktVal"><span class="nobreak">-1</span></span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">(flvector 0.0 0.0 0.0)</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="Struct_Type_and_Accessors.html#%28def._%28%28lib._images%2Fflomap..rkt%29._flomap-ref%2A%29%29" class="RktValLink" data-pltdoc="x">flomap-ref*</a></span><span class="hspace">&nbsp;</span><span class="RktSym">magenta-fm</span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="hspace">&nbsp;</span><span class="RktVal">1000</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">(flvector 0.0 0.0 0.0)</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="Struct_Type_and_Accessors.html#%28def._%28%28lib._images%2Fflomap..rkt%29._flomap-ref%29%29" class="RktValLink" data-pltdoc="x">flomap-ref</a></span><span class="hspace">&nbsp;</span><span class="RktSym">magenta-fm</span><span class="hspace">&nbsp;</span><span class="RktVal">3</span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktErr">flomap-ref: expected argument of type &lt;nonnegative fixnum &lt;</span></p></td></tr><tr><td><p><span class="RktErr">3&gt;; given: 3</span></p></td></tr></table></blockquote></div></p><p>Many flomap functions, such as <span class="RktSym"><a href="Struct_Type_and_Accessors.html#%28def._%28%28lib._images%2Fflomap..rkt%29._flomap-bilinear-ref%29%29" class="RktValLink" data-pltdoc="x">flomap-bilinear-ref</a></span> and <span class="RktSym"><a href="Spatial_Transformations.html#%28def._%28%28lib._images%2Fflomap..rkt%29._flomap-rotate%29%29" class="RktValLink" data-pltdoc="x">flomap-rotate</a></span>, treat their arguments as if every <span style="font-style: italic">real</span> <span class="RktSym">x</span> <span class="RktSym">y</span> coordinate has values.
In all such cases, known values are at half-integer coordinates and others are interpolated.</p><p><div class="SIntrapara">Examples:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="Struct_Type_and_Accessors.html#%28def._%28%28lib._images%2Fflomap..rkt%29._flomap-bilinear-ref%2A%29%29" class="RktValLink" data-pltdoc="x">flomap-bilinear-ref*</a></span><span class="hspace">&nbsp;</span><span class="RktSym">magenta-fm</span><span class="hspace">&nbsp;</span><span class="RktVal">0.5</span><span class="hspace">&nbsp;</span><span class="RktVal">0.5</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">(flvector 0.5 0.0 1.0)</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="Struct_Type_and_Accessors.html#%28def._%28%28lib._images%2Fflomap..rkt%29._flomap-bilinear-ref%2A%29%29" class="RktValLink" data-pltdoc="x">flomap-bilinear-ref*</a></span><span class="hspace">&nbsp;</span><span class="RktSym">magenta-fm</span><span class="hspace">&nbsp;</span><span class="RktVal">0.25</span><span class="hspace">&nbsp;</span><span class="RktVal">0.25</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">(flvector 0.28125 0.0 0.5625)</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="Struct_Type_and_Accessors.html#%28def._%28%28lib._images%2Fflomap..rkt%29._flomap-bilinear-ref%2A%29%29" class="RktValLink" data-pltdoc="x">flomap-bilinear-ref*</a></span><span class="hspace">&nbsp;</span><span class="RktSym">magenta-fm</span><span class="hspace">&nbsp;</span><span class="RktVal">0.0</span><span class="hspace">&nbsp;</span><span class="RktVal">0.0</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">(flvector 0.125 0.0 0.25)</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="Struct_Type_and_Accessors.html#%28def._%28%28lib._images%2Fflomap..rkt%29._flomap-bilinear-ref%2A%29%29" class="RktValLink" data-pltdoc="x">flomap-bilinear-ref*</a></span><span class="hspace">&nbsp;</span><span class="RktSym">magenta-fm</span><span class="hspace">&nbsp;</span><span class="RktVal"><span class="nobreak">-0</span>.25</span><span class="hspace">&nbsp;</span><span class="RktVal"><span class="nobreak">-0</span>.25</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">(flvector 0.03125 0.0 0.0625)</span></p></td></tr></table></blockquote></div></p><p>This conceptual model allows us to treat flomaps as if they were multi-valued functions on <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=ts-reference&amp;rel=type-ref.html%23%2528form._%2528%2528lib._typed-racket%252Fbase-env%252Fbase-types..rkt%2529._.Real%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">Real</a></span>&#215;<span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=ts-reference&amp;rel=type-ref.html%23%2528form._%2528%2528lib._typed-racket%252Fbase-env%252Fbase-types..rkt%2529._.Real%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">Real</a></span>.
For example, we might plot the red component of an ARGB icon:</p><p><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="hspace">&nbsp;</span><span class="RktSym">images/icons/misc</span><span class="hspace">&nbsp;</span><span class="RktSym">plot</span><span class="RktPn">)</span></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktSym">icon-fm</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">bomb-flomap</span><span class="hspace">&nbsp;</span><span class="RktPn">#:bomb-color</span><span class="hspace">&nbsp;</span><span class="RktVal">"orange"</span><span class="hspace">&nbsp;</span><span class="RktPn">#:height</span><span class="hspace">&nbsp;</span><span class="RktVal">48</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="Conversion_and_Construction.html#%28def._%28%28lib._images%2Fflomap..rkt%29._flomap-~3ebitmap%29%29" class="RktValLink" data-pltdoc="x">flomap-&gt;bitmap</a></span><span class="hspace">&nbsp;</span><span class="RktSym">icon-fm</span><span class="RktPn">)</span></td></tr><tr><td><p><img src="pict_126.png" alt="image" width="47" height="47"/></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=define.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._define-values%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">define-values</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">icon-width</span><span class="hspace">&nbsp;</span><span class="RktSym">icon-height</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="Struct_Type_and_Accessors.html#%28def._%28%28lib._images%2Fflomap..rkt%29._flomap-size%29%29" class="RktValLink" data-pltdoc="x">flomap-size</a></span><span class="hspace">&nbsp;</span><span class="RktSym">icon-fm</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym">plot3d</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">contour-intervals3d</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._%7Ece%7Ebb%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">&#955;</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">x</span><span class="hspace">&nbsp;</span><span class="RktSym">y</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="Struct_Type_and_Accessors.html#%28def._%28%28lib._images%2Fflomap..rkt%29._flomap-bilinear-ref%29%29" class="RktValLink" data-pltdoc="x">flomap-bilinear-ref</a></span><span class="hspace">&nbsp;</span><span class="RktSym">icon-fm</span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="hspace">&nbsp;</span><span class="RktSym">y</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktVal"><span class="nobreak">-0</span>.5</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252B%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">+</a></span><span class="hspace">&nbsp;</span><span class="RktVal">0.5</span><span class="hspace">&nbsp;</span><span class="RktSym">icon-width</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal"><span class="nobreak">-0</span>.5</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252B%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">+</a></span><span class="hspace">&nbsp;</span><span class="RktVal">0.5</span><span class="hspace">&nbsp;</span><span class="RktSym">icon-height</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><img style="vertical-align: 0px; margin: -3px -3px -3px -3px;" src="pict_127.png" alt="image" width="406" height="406"/></p></td></tr></table></blockquote></div><div class="SIntrapara">Notice that the plot&rsquo;s maximum height is above saturation (<span class="RktVal">1.0</span>).
The tallest peak corresponds to the specular highlight (the shiny part) on the bomb.
Specular highlights are one case where it is important to operate on oversaturated values without truncating them&#8212;<wbr></wbr>until it is time to display the image.</div></p><p>If we have a <span class="RktSym">w</span>&#215;<span class="RktSym">h</span> flomap and consider its known values as being at half-integer coordinates, the exact center of the flomap is at <span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252A%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">*</a></span><span class="stt"> </span><span class="RktVal">1/2</span><span class="stt"> </span><span class="RktSym">w</span><span class="RktPn">)</span> <span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252A%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">*</a></span><span class="stt"> </span><span class="RktVal">1/2</span><span class="stt"> </span><span class="RktSym">h</span><span class="RktPn">)</span>.
When unknown values are estimated using bilinear interpolation, the finite rectangle containing all the known <span style="font-style: italic">and estimated</span> nonzero values is from <span class="RktVal"><span class="nobreak">-1</span>/2</span> <span class="RktVal"><span class="nobreak">-1</span>/2</span> to <span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252B%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">+</a></span><span class="stt"> </span><span class="RktSym">w</span><span class="stt"> </span><span class="RktVal">1/2</span><span class="RktPn">)</span> <span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252B%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">+</a></span><span class="stt"> </span><span class="RktSym">h</span><span class="stt"> </span><span class="RktVal">1/2</span><span class="RktPn">)</span>.</p><h5 x-source-module="(lib &quot;images/scribblings/images.scrbl&quot;)" x-source-pkg="images-doc" x-part-tag="&quot;flomap:opacity&quot;">4.1.3<tt>&nbsp;</tt><a name="(part._flomap~3aopacity)"></a>Opacity (Alpha Components)</h5><p>A partially transparent flomap is simply a flomap in which component <span class="RktVal">0</span> is assumed to be an alpha (opacity) component.
The other components should be multiplied by their corresponding alpha value;
i.e. an RGB triple <span class="RktVal">1.0</span> <span class="RktVal">0.5</span> <span class="RktVal">0.25</span> with opacity <span class="RktVal">0.5</span> should be represented
by <span class="RktVal">0.5</span> <span class="RktVal">0.5</span> <span class="RktVal">0.25</span> <span class="RktVal">0.125</span>.</p><p><span class="refelem"><span class="refcolumn"><span class="refcontent">This representation generally goes by the unfortunate misnomer &ldquo;premultiplied alpha,&rdquo; which makes it seem as if the <span style="font-style: italic">alpha</span> component is multiplied by something.</span></span></span>
We will refer to this representation as <span style="font-style: italic">alpha-multiplied</span> because the color components are multiplied by the alpha component.
All alpha-aware functions consume alpha-multiplied flomaps and produce alpha-multiplied flomaps.</p><p><div class="SIntrapara">There are many good reasons to use alpha-multiplied flomaps instead of non-alpha-multiplied flomaps.
Some are:
</div><div class="SIntrapara"><ul><li><p>Compositing requires fewer operations per point.</p></li><li><p>Compositing is associative; i.e. <span class="RktPn">(</span><span class="RktSym"><a href="Compositing.html#%28def._%28%28lib._images%2Fflomap..rkt%29._flomap-lt-superimpose%29%29" class="RktValLink" data-pltdoc="x">flomap-lt-superimpose</a></span><span class="stt"> </span><span class="RktSym">fm1</span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="Compositing.html#%28def._%28%28lib._images%2Fflomap..rkt%29._flomap-lt-superimpose%29%29" class="RktValLink" data-pltdoc="x">flomap-lt-superimpose</a></span><span class="stt"> </span><span class="RktSym">fm2</span><span class="stt"> </span><span class="RktSym">fm3</span><span class="RktPn">)</span><span class="RktPn">)</span>
is the same as <span class="RktPn">(</span><span class="RktSym"><a href="Compositing.html#%28def._%28%28lib._images%2Fflomap..rkt%29._flomap-lt-superimpose%29%29" class="RktValLink" data-pltdoc="x">flomap-lt-superimpose</a></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="Compositing.html#%28def._%28%28lib._images%2Fflomap..rkt%29._flomap-lt-superimpose%29%29" class="RktValLink" data-pltdoc="x">flomap-lt-superimpose</a></span><span class="stt"> </span><span class="RktSym">fm1</span><span class="stt"> </span><span class="RktSym">fm2</span><span class="RktPn">)</span><span class="stt"> </span><span class="RktSym">fm3</span><span class="RktPn">)</span>, up to floating-point error.</p></li><li><p>There is only one transparent point: all zeros.
We could not conceptualize partially transparent flomaps as being infinite in size without a unique transparent point.</p></li><li><p>Many functions can operate on flomaps without treating the alpha component specially and still be correct.</p></li></ul></div></p><p><div class="SIntrapara">As an example of the last point, consider blur.
The following example creates an alpha-multiplied flomap using <span class="RktSym"><a href="Conversion_and_Construction.html#%28def._%28%28lib._images%2Fflomap..rkt%29._draw-flomap%29%29" class="RktValLink" data-pltdoc="x">draw-flomap</a></span>.
It blurs the flomap using a general-purpose (i.e. non-alpha-aware) blur function, then converts the flomap to non-alpha-multiplied and does the same.
</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktSym">circle-fm</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="Conversion_and_Construction.html#%28def._%28%28lib._images%2Fflomap..rkt%29._draw-flomap%29%29" class="RktValLink" data-pltdoc="x">draw-flomap</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._%7Ece%7Ebb%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">&#955;</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">fm-dc</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=ivaraccess.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fclass-internal..rkt%2529._send%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">send</a></span><span class="hspace">&nbsp;</span><span class="RktSym">fm-dc</span><span class="hspace">&nbsp;</span><span class="RktSym">set-pen</span><span class="hspace">&nbsp;</span><span class="RktVal">"black"</span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">transparent</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=ivaraccess.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fclass-internal..rkt%2529._send%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">send</a></span><span class="hspace">&nbsp;</span><span class="RktSym">fm-dc</span><span class="hspace">&nbsp;</span><span class="RktSym">set-brush</span><span class="hspace">&nbsp;</span><span class="RktVal">"green"</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">solid</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=ivaraccess.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fclass-internal..rkt%2529._send%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">send</a></span><span class="hspace">&nbsp;</span><span class="RktSym">fm-dc</span><span class="hspace">&nbsp;</span><span class="RktSym">draw-ellipse</span><span class="hspace">&nbsp;</span><span class="RktVal">10</span><span class="hspace">&nbsp;</span><span class="RktVal">10</span><span class="hspace">&nbsp;</span><span class="RktVal">30</span><span class="hspace">&nbsp;</span><span class="RktVal">30</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktVal">50</span><span class="hspace">&nbsp;</span><span class="RktVal">50</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="Conversion_and_Construction.html#%28def._%28%28lib._images%2Fflomap..rkt%29._flomap-~3ebitmap%29%29" class="RktValLink" data-pltdoc="x">flomap-&gt;bitmap</a></span><span class="hspace">&nbsp;</span><span class="RktSym">circle-fm</span><span class="RktPn">)</span></td></tr><tr><td><p><img src="pict_128.png" alt="image" width="50" height="50"/></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="Conversion_and_Construction.html#%28def._%28%28lib._images%2Fflomap..rkt%29._flomap-~3ebitmap%29%29" class="RktValLink" data-pltdoc="x">flomap-&gt;bitmap</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="Blur.html#%28def._%28%28lib._images%2Fflomap..rkt%29._flomap-blur%29%29" class="RktValLink" data-pltdoc="x">flomap-blur</a></span><span class="hspace">&nbsp;</span><span class="RktSym">circle-fm</span><span class="hspace">&nbsp;</span><span class="RktVal">4</span><span class="hspace">&nbsp;</span><span class="RktVal">4</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><img src="pict_129.png" alt="image" width="50" height="50"/></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=let.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fletstx-scheme..rkt%2529._let%252A%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">let*</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">fm</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="Conversion_and_Construction.html#%28def._%28%28lib._images%2Fflomap..rkt%29._flomap-divide-alpha%29%29" class="RktValLink" data-pltdoc="x">flomap-divide-alpha</a></span><span class="hspace">&nbsp;</span><span class="RktSym">circle-fm</span><span class="RktPn">)</span><span class="RktPn">]</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">[</span><span class="RktSym">fm</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="Blur.html#%28def._%28%28lib._images%2Fflomap..rkt%29._flomap-blur%29%29" class="RktValLink" data-pltdoc="x">flomap-blur</a></span><span class="hspace">&nbsp;</span><span class="RktSym">fm</span><span class="hspace">&nbsp;</span><span class="RktVal">4</span><span class="hspace">&nbsp;</span><span class="RktVal">4</span><span class="RktPn">)</span><span class="RktPn">]</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">[</span><span class="RktSym">fm</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="Conversion_and_Construction.html#%28def._%28%28lib._images%2Fflomap..rkt%29._flomap-multiply-alpha%29%29" class="RktValLink" data-pltdoc="x">flomap-multiply-alpha</a></span><span class="hspace">&nbsp;</span><span class="RktSym">fm</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="Conversion_and_Construction.html#%28def._%28%28lib._images%2Fflomap..rkt%29._flomap-~3ebitmap%29%29" class="RktValLink" data-pltdoc="x">flomap-&gt;bitmap</a></span><span class="hspace">&nbsp;</span><span class="RktSym">fm</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><img src="pict_130.png" alt="image" width="50" height="50"/></p></td></tr></table></blockquote></div><div class="SIntrapara">Notice the dark band around the second blurred circle.</div></p><p>Of course, this could be fixed by making <span class="RktSym"><a href="Blur.html#%28def._%28%28lib._images%2Fflomap..rkt%29._flomap-blur%29%29" class="RktValLink" data-pltdoc="x">flomap-blur</a></span> operate differently on flomaps with an alpha component.
But the implementation would amount to converting them to alpha-multiplied flomaps anyway.</p><p>The only valid reason to not multiply color components by alpha is loss of precision, which is not an issue with flomaps.</p><h5 x-source-module="(lib &quot;images/scribblings/images.scrbl&quot;)" x-source-pkg="images-doc" x-part-tag="&quot;flomap:layout&quot;">4.1.4<tt>&nbsp;</tt><a name="(part._flomap~3alayout)"></a>Data Layout</h5><p>For most applications, there should be enough flomap functions available that you should not need to access their fields directly.
However, there will always be use cases for direct manipulation, so the fields are public.</p><p>The color values in a flomap are stored flattened in a single <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=ts-reference&amp;rel=type-ref.html%23%2528form._%2528%2528lib._typed-racket%252Fbase-env%252Fbase-types..rkt%2529._.Fl.Vector%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">FlVector</a></span>, in row-major order with adjacent color components.
For example, a 2&#215;2 RGB flomap can be visualized as</p><p><img style="vertical-align: 3.0px; margin: -3px -3px -3px -3px;" src="pict_131.png" alt="image" width="141.0" height="151.0"/></p><p>In a flomap, it would be stored as</p><p><img style="vertical-align: -0.0px; margin: -3px -3px -3px -3px;" src="pict_132.png" alt="image" width="366.0" height="36.0"/></p><p><div class="SIntrapara">Mathematically, for a <span class="RktSym">c</span>-component, <span class="RktSym">w</span>-width flomap, the <span class="RktSym">k</span>th color component at position <span class="RktSym">x</span> <span class="RktSym">y</span> is at index
</div><div class="SIntrapara"><blockquote class="SCodeFlow"><p><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252B%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">+</a></span><span class="hspace">&nbsp;</span><span class="RktSym">k</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252A%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">*</a></span><span class="hspace">&nbsp;</span><span class="RktSym">c</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252B%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">+</a></span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252A%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">*</a></span><span class="hspace">&nbsp;</span><span class="RktSym">y</span><span class="hspace">&nbsp;</span><span class="RktSym">w</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></p></blockquote></div><div class="SIntrapara">The <span class="RktSym"><a href="Struct_Type_and_Accessors.html#%28def._%28%28lib._images%2Fflomap..rkt%29._coords-~3eindex%29%29" class="RktValLink" data-pltdoc="x">coords-&gt;index</a></span> function carries out this calculation quickly using only fixnum arithmetic.</div></p><p>If <span class="RktSym">i</span> is a calculated index for the value at <span class="RktSym">k</span> <span class="RktSym">x</span> <span class="RktSym">y</span>,
then the <span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252B%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">+</a></span><span class="stt"> </span><span class="RktSym">k</span><span class="stt"> </span><span class="RktVal">1</span><span class="RktPn">)</span>th value is at index <span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252B%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">+</a></span><span class="stt"> </span><span class="RktSym">i</span><span class="stt"> </span><span class="RktVal">1</span><span class="RktPn">)</span>,
the <span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252B%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">+</a></span><span class="stt"> </span><span class="RktSym">x</span><span class="stt"> </span><span class="RktVal">1</span><span class="RktPn">)</span>th value is at index <span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252B%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">+</a></span><span class="stt"> </span><span class="RktSym">i</span><span class="stt"> </span><span class="RktSym">c</span><span class="RktPn">)</span>,
and the <span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252B%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">+</a></span><span class="stt"> </span><span class="RktSym">y</span><span class="stt"> </span><span class="RktVal">1</span><span class="RktPn">)</span>th value is at index <span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252B%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">+</a></span><span class="stt"> </span><span class="RktSym">i</span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252A%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">*</a></span><span class="stt"> </span><span class="RktSym">c</span><span class="stt"> </span><span class="RktSym">w</span><span class="RktPn">)</span><span class="RktPn">)</span>.</p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;6.7&quot;, &quot;../&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }"/></form>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.7&quot;);">top</a></span><span class="navright">&nbsp;&nbsp;<a href="flomap_title.html" title="backward to &quot;4 Floating-Point Bitmaps&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="flomap_title.html" title="up to &quot;4 Floating-Point Bitmaps&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<a href="Struct_Type_and_Accessors.html" title="forward to &quot;4.2 Struct Type and Accessors&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div></div></div><div id="contextindicator">&nbsp;</div></body></html>