CodingTrain / CodingTrain/Suggestion-Box

Water ripples in tf.js

オープン
#963 コメント 6 件 リアクション 0 件 担当者 1 名 @shiffman が担当を希望しています GitHub で見る
主要言語
言語のデータがありません
スター
570
フォーク
85
PR マージ指標
30日以内にマージされた PR はありません

説明

During live session I've noticed, that this pseudo-code
```
for every non-edge element:
loop
Buffer2(x, y) = (Buffer1(x - 1, y) +
Buffer1(x + 1, y) +
Buffer1(x, y + 1) +
Buffer1(x, y - 1)) / 2 - Buffer2(x, y)
Buffer2(x, y) = Buffer2(x, y) * damping
end loop
```
can be rewritten in terms of matrices:
```
Buffer2 = conv2d(Buffer1, kernel) - Buffer2
Buffer2 *= damping
```
where `kernel` is a 3*3 matrix of the following
```
[[0.0 0.5 0.0],
[0.5 0.0 0.5],
[0.0 0.5 0.0]]
```
Perhaps, it would be easier to explain what is convolution on this example

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。