(???) !DOCTYPE html>
(???) html>
(???) <head>
(???) <meta charset="utf-8">
(???) <meta name="viewport" content="width=device-width, initial-scale=1.0">
(???) <title>sincos8.8-fixed-point</title>
(???) <link href="/css/black-no6.css" rel="stylesheet">
(???) <link rel="alternate" type="application/rss+xml" title="RSS Feed" href="https://joriszwart.nl/feed/rss.xml">
(???) <link rel="alternate" type="application/atom+xml" title="Atom Feed" href="https://joriszwart.nl/feed/atom.xml">
(???) <link rel="alternate" type="application/json" title="JSON Feed" href="https://joriszwart.nl/feed/feed.json">
(???) <meta property="og:title" content="sincos8.8-fixed-point">
(???) <meta property="og:description" content="sincos8.8-fixed-point">
(???) <meta property="og:image" content="https://joriszwart.nl/images/joriszwart-logo-black.png">
(???) <meta property="og:url" content="https://joriszwart.nl/math/minsky/sincos8.8-fixed-point">
(???)
(???) </head>
(???) <body>
(???) <nav class="fixed-top sticky light">
(???)
(???) <ul>
(???) <li><a href="/articles">My articles</a></li>
(???) <li><a href="/games">My games</a></li>
(???) <li><a href="/projects">My projects</a></li>
(???) <li><a href="/talks">My talks</a></li>
(???) <li><a href="/contact">Contact</a></li>
(???) </ul>
(???) </nav>
(???) <header>
(???)
(???) <a href="/">
(???)
(???) <img src="/images/joriszwart-logo.png" alt="joriszwart.nl" width="577" height="74">
(???) <p class="uppercase"></p>
(???) </a>
(???) </header>
(???) <main>
(???)
(???) <article>
(???) <header>
(???) </header>
(???) <p>// how to control the frequency?</p>
(???) p><canvas width="360"></canvas></p>
(???) p>const context = document.querySelector(‘canvas’).getContext(‘2d’)</p>
(???) p>// const k = 256
(???) et sin = 0, cos = 75 * 256</p>
(???) p>for(let x = 0; x < context.canvas.width; x += .1) {
(SND) in += cos » 8 // divide by 256 (k)
(???) os -= sin » 8</p>
(???) pre><code>context.fillStyle = 'blue'
(???) ontext.fillRect(x, context.canvas.height / 2 + sin / 256, 1, 1)
(???) ontext.fillStyle = 'red'
(???) ontext.fillRect(x, context.canvas.height / 2 + cos / 256, 1, 1)
(???) /code></pre>
(???) p>}</p>
(???)
(???) </article>
(???) <div class="prevnext" id="prevnext">
(???) <a href="/math/minsky/sincos-phase" rel="prev">
(???) <strong>previous</strong><br>
(???) sincos-phase
(???) </a>
(???) </div>
(???) </main>
(???) <footer id="footer">
(???) <nav>
(???) <ul>
(???)
(???) <li><a href="/search">Search</a></li>
(???) <li><a href="/categories">Categories</a></li>
(???) <li><a href="/tags">Tags</a></li>
(???)
(???) </ul>
(???) </nav>
(???) <div>
(???) <a href="/"><img src="/images/joriszwart-logo.png" alt="" width="265" height="34"></a>
(???) </div>
(???) </footer>
(???) </body>
(???) /html>