<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>katakanan</author_name>
  <author_url>https://blog.hatena.ne.jp/katakanan/</author_url>
  <blog_title>e-tipsmemo</blog_title>
  <blog_url>https://e-tipsmemo.hatenablog.com/</blog_url>
  <categories>
    <anon>プログラム</anon>
    <anon>Rust</anon>
    <anon>レイトレーシング</anon>
  </categories>
  <description>Rustでの演算子オーバーロードを行うために、構造体にAdd/Mul/Div Traitを実装する。これを用いることで足し算、掛け算、割り算の演算子を使える。 スーパーサンプリングは光線の方向にランダムな要素を加えて、その方向から得られた色から平均をとることで物体のジャギを抑える事ができる。 rand::thread_rng().gen_range(a, b); でa~bの乱数を得られる。 rand crateが必要なのでCargo.tomlに追加する。 ついでに実行時引数でスーパーサンプリングの回数を変更可能にした。スーパーサンプリングを10回行った場合。 左がスーパーサンプリングなし。 右…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fe-tipsmemo.hatenablog.com%2Fentry%2F2018%2F02%2F17%2F000000&quot; title=&quot;Rust レイトレーシング ⑥ スーパーサンプリング - e-tipsmemo&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/k/katakanan/20180202/20180202015220.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2018-02-17 00:00:00</published>
  <title>Rust レイトレーシング ⑥ スーパーサンプリング</title>
  <type>rich</type>
  <url>https://e-tipsmemo.hatenablog.com/entry/2018/02/17/000000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
