commit 7d953161336c6f579267e15ec8b13b48eebdbdca
parent 5e0e250b70150df92937229a486e4b2273726633
Author: Kenji Matsuda <ftvda283@gmail.com>
Date: Sun, 3 Oct 2021 14:21:26 +0900
finish transformations.html
Diffstat:
2 files changed, 8 insertions(+), 88 deletions(-)
diff --git a/translation/Getting-started/Transformations.html b/translation/Getting-started/Transformations.html
@@ -676,46 +676,37 @@ trans = <function id='57'>glm::rotate</function>(trans, (float)<function id='47'
<p>
And there you have it. A translated container that's rotated over time, all done by a single transformation matrix! Now you can see why matrices are such a powerful construct in graphics land. We can define an infinite amount of transformations and combine them all in a single matrix that we can re-use as often as we'd like. Using transformations like this in the vertex shader saves us the effort of re-defining the vertex data and saves us some processing time as well, since we don't have to re-send our data all the time (which is quite slow); all we need to do is update the transformation uniform.
+ やりました。平行移動された箱が時間と共に回転しています。すべての変換がひとつの変換行列で行われました。グラフィックスの世界において行列がいかに強力な道具であるかということが理解できたでしょう。変換行列は好きなだけ定義してひとつにまとめることができ、その変換行列はいつでも再利用できます。このように頂点シェーダーにおいて変換行列を利用することで、いちいち頂点データを再定義する面倒を回避でき、またそのデータをシェーダーに再送する必要がなくなるので処理時間も短縮できます(データの送信は遅いのです)。必要なことは変換行列の更新だけです。
</p>
<p>
If you didn't get the right result or you're stuck somewhere else, take a look at the <a href="/code_viewer_gh.php?code=src/1.getting_started/5.1.transformations/transformations.cpp" target="_blank">source code</a> and the updated <a href="https://learnopengl.com/code_viewer_gh.php?code=includes/learnopengl/shader_m.h" target="_blank">shader</a> class.
+ 正しい結果が得られなかったり、どこかで詰まったのであれば、<a href="/code_viewer_gh.php?code=src/1.getting_started/5.1.transformations/transformations.cpp" target="_blank">ソースコード</a>を確認して、<a href="https://learnopengl.com/code_viewer_gh.php?code=includes/learnopengl/shader_m.h" target="_blank">シェーダー</a>クラスを更新して下さい。
</p>
<p>
In the next chapter we'll discuss how we can use matrices to define different coordinate spaces for our vertices. This will be our first step into 3D graphics!
+ 次章では行列を用いて頂点のための別の座標空間を定義する方法を議論します。3次元グラフィックスへの最初の一歩です。
</p>
<h2>Further reading</h2>
+<h2>参考文献</h2>
<ul>
<li><a href="https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab" target="_blank">Essence of Linear Algebra</a>: great video tutorial series by Grant Sanderson about the underlying mathematics of transformations and linear algebra.</li>
-
+ <li><a href="https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab" target="_blank">線形代数学の基本</a>: Grant Sandersonによる座標変換と線形代数学に関する入門的なすばらしい動画シリーズ。
</ul>
<h2>Exercises</h2>
+<h2>演習問題</h2>
<p>
<ul>
<li>Using the last transformation on the container, try switching the order around by first rotating and then translating. See what happens and try to reason why this happens: <a href="/code_viewer_gh.php?code=src/1.getting_started/5.2.transformations_exercise1/transformations_exercise1.cpp" target="_blank">solution</a>.</li>
+ <li>箱に対する最後の変換を利用し、変換の順序を入れ替えて、まず回転しその後平行移動して下さい。なにが起こるのか確認し、その理由を考えて下さい: <a href="/code_viewer_gh.php?code=src/1.getting_started/5.2.transformations_exercise1/transformations_exercise1.cpp" target="_blank">解答</a>。</li>
<li>Try drawing a second container with another call to <fun><function id='2'>glDrawElements</function></fun> but place it at a different position using transformations <strong>only</strong>. Make sure this second container is placed at the top-left of the window and instead of rotating, scale it over time (using the <code>sin</code> function is useful here; note that using <code>sin</code> will cause the object to invert as soon as a negative scale is applied): <a href="/code_viewer_gh.php?code=src/1.getting_started/5.2.transformations_exercise2/transformations_exercise2.cpp" target="_blank">solution</a>.</li>
+ <li><fun><function id='2'>glDrawElements</function></fun>をもう一度呼び出し、2つ目の箱を描いて下さい。ただし座標変換<strong>のみ</strong>を用いて別の場所に表示して下さい。この2つ目の箱は画面の左上に表示し、今回は回転させるのではなく時間と共に拡大縮小して下さい。拡大縮小には<code>sin</code>関数が便利です。<code>sin</code>を使うと拡大率が負になったときに物体が反転します:<a href="/code_viewer_gh.php?code=src/1.getting_started/5.2.transformations_exercise2/transformations_exercise2.cpp" target="_blank">解答</a>。</li>
</ul>
</p>
</div>
-
- <div id="hover">
- HI
- </div>
- <!-- 728x90/320x50 sticky footer -->
-<div id="waldo-tag-6196"></div>
-
- <div id="disqus_thread"></div>
-
-
-
-
-</div> <!-- container div -->
-
-
-</div> <!-- super container div -->
</body>
</html>
diff --git a/translation/download b/translation/download
@@ -1,71 +0,0 @@
- curl https://learnopengl.com/Introduction --create-dirs -o Introduction.html && sleep 0.5
- curl https://learnopengl.com/Getting-started/OpenGL --create-dirs -o Getting-started/OpenGL.html && sleep 0.5
- curl https://learnopengl.com/Getting-started/Creating-a-window --create-dirs -o Getting-started/Creating-a-window.html && sleep 0.5
- curl https://learnopengl.com/Getting-started/Hello-Window --create-dirs -o Getting-started/Hello-Window.html && sleep 0.5
- curl https://learnopengl.com/Getting-started/Hello-Triangle --create-dirs -o Getting-started/Hello-Triangle.html && sleep 0.5
- curl https://learnopengl.com/Getting-started/Shaders --create-dirs -o Getting-started/Shaders.html && sleep 0.5
- curl https://learnopengl.com/Getting-started/Textures --create-dirs -o Getting-started/Textures.html && sleep 0.5
- curl https://learnopengl.com/Getting-started/Transformations --create-dirs -o Getting-started/Transformations.html && sleep 0.5
- curl https://learnopengl.com/Getting-started/Coordinate-Systems --create-dirs -o Getting-started/Coordinate-Systems.html && sleep 0.5
- curl https://learnopengl.com/Getting-started/Camera --create-dirs -o Getting-started/Camera.html && sleep 0.5
- curl https://learnopengl.com/Getting-started/Review --create-dirs -o Getting-started/Review.html && sleep 0.5
- curl https://learnopengl.com/Lighting/Colors --create-dirs -o Lighting/Colors.html && sleep 0.5
- curl https://learnopengl.com/Lighting/Basic-Lighting --create-dirs -o Lighting/Basic-Lighting.html && sleep 0.5
- curl https://learnopengl.com/Lighting/Materials --create-dirs -o Lighting/Materials.html && sleep 0.5
- curl https://learnopengl.com/Lighting/Lighting-maps --create-dirs -o Lighting/Lighting-maps.html && sleep 0.5
- curl https://learnopengl.com/Lighting/Light-casters --create-dirs -o Lighting/Light-casters.html && sleep 0.5
- curl https://learnopengl.com/Lighting/Multiple-lights --create-dirs -o Lighting/Multiple-lights.html && sleep 0.5
- curl https://learnopengl.com/Lighting/Review --create-dirs -o Lighting/Review.html && sleep 0.5
- curl https://learnopengl.com/Model-Loading/Assimp --create-dirs -o Model-Loading/Assimp.html && sleep 0.5
- curl https://learnopengl.com/Model-Loading/Mesh --create-dirs -o Model-Loading/Mesh.html && sleep 0.5
- curl https://learnopengl.com/Model-Loading/Model --create-dirs -o Model-Loading/Model.html && sleep 0.5
- curl https://learnopengl.com/Advanced-OpenGL/Depth-testing --create-dirs -o Advanced-OpenGL/Depth-testing.html && sleep 0.5
- curl https://learnopengl.com/Advanced-OpenGL/Stencil-testing --create-dirs -o Advanced-OpenGL/Stencil-testing.html && sleep 0.5
- curl https://learnopengl.com/Advanced-OpenGL/Blending --create-dirs -o Advanced-OpenGL/Blending.html && sleep 0.5
- curl https://learnopengl.com/Advanced-OpenGL/Face-culling --create-dirs -o Advanced-OpenGL/Face-culling.html && sleep 0.5
- curl https://learnopengl.com/Advanced-OpenGL/Framebuffers --create-dirs -o Advanced-OpenGL/Framebuffers.html && sleep 0.5
- curl https://learnopengl.com/Advanced-OpenGL/Cubemaps --create-dirs -o Advanced-OpenGL/Cubemaps.html && sleep 0.5
- curl https://learnopengl.com/Advanced-OpenGL/Advanced-Data --create-dirs -o Advanced-OpenGL/Advanced-Data.html && sleep 0.5
- curl https://learnopengl.com/Advanced-OpenGL/Advanced-GLSL --create-dirs -o Advanced-OpenGL/Advanced-GLSL.html && sleep 0.5
- curl https://learnopengl.com/Advanced-OpenGL/Geometry-Shader --create-dirs -o Advanced-OpenGL/Geometry-Shader.html && sleep 0.5
- curl https://learnopengl.com/Advanced-OpenGL/Instancing --create-dirs -o Advanced-OpenGL/Instancing.html && sleep 0.5
- curl https://learnopengl.com/Advanced-OpenGL/Anti-Aliasing --create-dirs -o Advanced-OpenGL/Anti-Aliasing.html && sleep 0.5
- curl https://learnopengl.com/Advanced-Lighting/Advanced-Lighting --create-dirs -o Advanced-Lighting/Advanced-Lighting.html && sleep 0.5
- curl https://learnopengl.com/Advanced-Lighting/Gamma-Correction --create-dirs -o Advanced-Lighting/Gamma-Correction.html && sleep 0.5
- curl https://learnopengl.com/Advanced-Lighting/Shadows/Shadow-Mapping --create-dirs -o Advanced-Lighting/Shadows/Shadow-Mapping.html && sleep 0.5
- curl https://learnopengl.com/Advanced-Lighting/Shadows/Point-Shadows --create-dirs -o Advanced-Lighting/Shadows/Point-Shadows.html && sleep 0.5
- curl https://learnopengl.com/Advanced-Lighting/Normal-Mapping --create-dirs -o Advanced-Lighting/Normal-Mapping.html && sleep 0.5
- curl https://learnopengl.com/Advanced-Lighting/Parallax-Mapping --create-dirs -o Advanced-Lighting/Parallax-Mapping.html && sleep 0.5
- curl https://learnopengl.com/Advanced-Lighting/HDR --create-dirs -o Advanced-Lighting/HDR.html && sleep 0.5
- curl https://learnopengl.com/Advanced-Lighting/Bloom --create-dirs -o Advanced-Lighting/Bloom.html && sleep 0.5
- curl https://learnopengl.com/Advanced-Lighting/Deferred-Shading --create-dirs -o Advanced-Lighting/Deferred-Shading.html && sleep 0.5
- curl https://learnopengl.com/Advanced-Lighting/SSAO --create-dirs -o Advanced-Lighting/SSAO.html && sleep 0.5
- curl https://learnopengl.com/PBR/Theory --create-dirs -o PBR/Theory.html && sleep 0.5
- curl https://learnopengl.com/PBR/Lighting --create-dirs -o PBR/Lighting.html && sleep 0.5
- curl https://learnopengl.com/PBR/IBL/Diffuse-irradiance --create-dirs -o PBR/IBL/Diffuse-irradiance.html && sleep 0.5
- curl https://learnopengl.com/PBR/IBL/Specular-IBL --create-dirs -o PBR/IBL/Specular-IBL.html && sleep 0.5
- curl https://learnopengl.com/In-Practice/Debugging --create-dirs -o In-Practice/Debugging.html && sleep 0.5
- curl https://learnopengl.com/In-Practice/Text-Rendering --create-dirs -o In-Practice/Text-Rendering.html && sleep 0.5
- curl https://learnopengl.com/In-Practice/2D-Game/Breakout --create-dirs -o In-Practice/2D-Game/Breakout.html && sleep 0.5
- curl https://learnopengl.com/In-Practice/2D-Game/Setting-up --create-dirs -o In-Practice/2D-Game/Setting-up.html && sleep 0.5
- curl https://learnopengl.com/In-Practice/2D-Game/Rendering-Sprites --create-dirs -o In-Practice/2D-Game/Rendering-Sprites.html && sleep 0.5
- curl https://learnopengl.com/In-Practice/2D-Game/Levels --create-dirs -o In-Practice/2D-Game/Levels.html && sleep 0.5
- curl https://learnopengl.com/In-Practice/2D-Game/Collisions/Ball --create-dirs -o In-Practice/2D-Game/Collisions/Ball.html && sleep 0.5
- curl https://learnopengl.com/In-Practice/2D-Game/Collisions/Collision-detection --create-dirs -o In-Practice/2D-Game/Collisions/Collision-detection.html && sleep 0.5
- curl https://learnopengl.com/In-Practice/2D-Game/Collisions/Collision-resolution --create-dirs -o In-Practice/2D-Game/Collisions/Collision-resolution.html && sleep 0.5
- curl https://learnopengl.com/In-Practice/2D-Game/Particles --create-dirs -o In-Practice/2D-Game/Particles.html && sleep 0.5
- curl https://learnopengl.com/In-Practice/2D-Game/Postprocessing --create-dirs -o In-Practice/2D-Game/Postprocessing.html && sleep 0.5
- curl https://learnopengl.com/In-Practice/2D-Game/Powerups --create-dirs -o In-Practice/2D-Game/Powerups.html && sleep 0.5
- curl https://learnopengl.com/In-Practice/2D-Game/Audio --create-dirs -o In-Practice/2D-Game/Audio.html && sleep 0.5
- curl https://learnopengl.com/In-Practice/2D-Game/Render-text --create-dirs -o In-Practice/2D-Game/Render-text.html && sleep 0.5
- curl https://learnopengl.com/In-Practice/2D-Game/Final-thoughts --create-dirs -o In-Practice/2D-Game/Final-thoughts.html && sleep 0.5
- curl https://learnopengl.com/Guest-Articles/How-to-publish --create-dirs -o Guest-Articles/How-to-publish.html && sleep 0.5
- curl https://learnopengl.com/Guest-Articles/2020/OIT/Introduction --create-dirs -o Guest-Articles/2020/OIT/Introduction.html && sleep 0.5
- curl https://learnopengl.com/Guest-Articles/2020/OIT/Weighted-Blended --create-dirs -o Guest-Articles/2020/OIT/Weighted-Blended.html && sleep 0.5
- curl https://learnopengl.com/Guest-Articles/2020/Skeletal-Animation --create-dirs -o Guest-Articles/2020/Skeletal-Animation.html && sleep 0.5
- curl https://learnopengl.com/Guest-Articles/2021/CSM --create-dirs -o Guest-Articles/2021/CSM.html && sleep 0.5
- curl https://learnopengl.com/Guest-Articles/2021/Scene/Scene-Graph --create-dirs -o Guest-Articles/2021/Scene/Scene-Graph.html && sleep 0.5
- curl https://learnopengl.com/Guest-Articles/2021/Scene/Frustum-Culling --create-dirs -o Guest-Articles/2021/Scene/Frustum-Culling.html && sleep 0.5
- curl https://learnopengl.com/Code-repository --create-dirs -o Code-repository.html && sleep 0.5
- curl https://learnopengl.com/Translations --create-dirs -o Translations.html && sleep 0.5
- curl https://learnopengl.com/About --create-dirs -o About.html && sleep 0.5