演習2-3: アノテーションをつけてみよう
annotation.jsを編集
- drawAnnotations関数を探す
- 各種アノテーション処理のコメントを外す
- 各種アノテーション処理のパラメータを変える
- 組み合わせを自由にデザイン
distanceAnnotation
distanceAnnotation(markerID1, markerID2)
- markerID1: マーカー1のID
- markerID2: マーカー2のID
マーカー1とマーカー2の距離を測る
2点間の距離の公式
\(d = || \mathbf{p}_2 - \mathbf{p}_1|| = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\)
angleAnnotation
angleAnnotation(markerID1, markerID2, markerID3);
- markerID1, markerID2, markerID3を順につなぐ
\(\angle \mathbf{p}_1 \mathbf{p}_2 \mathbf{p}_3\)の角度\(\theta\)を求める
⇨\(\mathbf{v}_1\)と \(\mathbf{v}_2\)の内積
⇨ \(\mathbf{v}_1 \cdot \mathbf{v}_2 = |\mathbf{v}_1 | | \mathbf{v}_2 | \cos \theta\)
\(\cos \theta\)から\(\theta\)を求める.
velocityAnnotation
velocityAnnotation(markerID, scale);
- markerID: ターゲットマーカーの速度情報を可視化
- scale: 方向の可視化の線の長さのスケーリング値
位置の時間変化
⇨両隣から速度を計算
\(\mathbf{v}_t = \frac{\mathbf{p}_+ - \mathbf{p}_-}{t_+ - t_- }\)
accelerationAnnotation
accelerationAnnotation(markerID, scale);
- markerID: ターゲットマーカーの加速度情報を可視化
- scale: 加速度の可視化の線の長さのスケーリング値
※ 速度と同様の計算方法
他メンバーとの比較
メンバー毎にアノテーションの組み合わせを変えて比較する.
フォームに提出するスクリーンショット
自分の物一つを提出すればよい.
他メンバーの結果と比較した際の違いの項目では,他の人の結果も考慮して書く.