Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

28 Commits

Folders and files

Repository files navigation

practice-for-3D-math

This repository has been used for the understanding of Mathematics for Machine Learning as followed below Table of Contents with typing the code per chapter.

“I wanted JARVIS🤖. Unfortunately, I had to learn linear algebra first.”


📢Note that the below Table of Contents will be modified anytime when each Three.js module is added since i'm a newbie of both Three.js and MML as well.

📚Table of Contents

A 12-week journey from linear algebra to WebXR — learning each concept twice: once through MML, and once again by making it visible with Three.js.

Week 0 — ✅ Linear Systems (MML 2.1–2.3)

  • Gaussian elimination, REF/RREF, inverse matrices, and the Minus-1 Trick
  • General solutions as a particular solution plus the null space
  • Checkpoint: Understand how linear systems describe the degrees of freedom available in a 3D scene

Weeks 1–2 — ✅ Vector Spaces and Bases (MML 2.4–2.6)

  • Vector spaces, subspaces, linear independence, bases, and dimension
  • Manipulate a cube with Vector3, add(), and multiplyScalar()
  • XR connection: Independent basis vectors form a valid coordinate frame; dependent vectors collapse geometry and break surface normals
  • Build: A scene where vector operations become visible spatial movement

Weeks 3–4 — ✅ Linear Mappings and Affine Spaces (MML 2.7–2.8)

  • Linear mappings, transformation matrices, change of basis, and affine spaces
  • Construct translation, rotation, and scaling matrices by hand with Matrix4
  • Explore matrix composition directly: SR ≠ RS
  • XR connection: Affine space provides the mathematical bridge from linear transformations to translation in 3D space
  • Build: An interactive transformation-matrix visualization

Weeks 5–6 — ☑️Homogeneous Coordinates and the MVP Pipeline

  • Move beyond MML into the Three.js rendering pipeline
  • Understand why 3D graphics uses 4×4 matrices and what the w component represents
  • Deconstruct the PerspectiveCamera projection matrix
  • Build: A scene that reveals each stage of Model → View → Projection

Weeks 7–9 — Analytic Geometry (MML Chapter 3)

  • Inner products, norms, distances, angles, orthogonality, and projections
  • Use Raycaster for object selection and calculate surface normals and angles
  • XR connection: The mathematical core of spatial queries, pointing, collision reasoning, lighting, and interaction
  • Build: A raycasting-based spatial interaction scene

Weeks 10–11 — From Euler Angles to Quaternions

  • Examine the limits of Euler angles and reproduce gimbal lock
  • Learn quaternion rotation and smooth interpolation with Quaternion.slerp()
  • XR connection: Stable orientation tracking for cameras, controllers, and spatial objects
  • Build: An interactive Euler-angle vs. quaternion comparison

Week 12 — Enter WebXR

  • Enable renderer.xr across the scenes built throughout the roadmap
  • Test headset viewpoints and spatial interaction with the WebXR Emulator
  • Final Build: Three WebXR scenes that turn the mathematical foundations into an immersive experience

Beyond the Roadmap

Linear Algebra → 3D Geometry → Three.js → WebXR → Spatial Interaction → Digital Twins → Physical AI

This roadmap is not a deadline. The objective is to keep the chain unbroken: study the mathematics, render it, interact with it, and eventually bring it into XR.

MVP 통합 실습 (2.10)

npm install
npm run dev

기본 화면 또는 ?exercise=mvp에서 실행한다. 왼쪽은 월드 관찰용 카메라, 오른쪽은 학습 카메라의 실제 화면이다. 왼쪽 드래그는 관찰 시점만 바꾼다. 노란 로컬 점 (1, 1, 0, 1)의 좌표를 표에서 따라간다.

  1. 기본 배치: 물체는 Z = −4, 카메라는 원점. 카메라 좌표 (1, 1, −4, 1)과 클립의 w′ = 4를 확인한다.
  2. 카메라 X를 +1로 이동: 점의 카메라 X는 0이 되고 화면 가운데 세로선으로 이동한다.
  3. 물체 Z를 −8로 이동: 깊이가 커지면 화면에서 점이 중심에 가까워지고 물체가 작아진다.
  4. 카메라 Y축 회전을 바꿔 축을 기준으로 좌표를 읽는 과정을 비교한다. 양의 회전은 오른손 규칙을 따른다.
  5. 시야각을 바꾸고 NDC 및 화면 좌표의 변화를 확인한다.

표는 p_clip = P V M p_local을 단계별로 계산하고, 마지막에만 w′로 나눈다. 화면 좌표는 오른쪽 뷰의 CSS 픽셀 기준이며 화면 경계는 (W, H)이다. 흰 원은 계산한 점의 위치와 실제 렌더링을 비교한다. 카메라 뒤, 시야각 밖, near/far 밖의 점은 표시하지 않는다. near = 0.1, far = 20.

이전 실습: ?exercise=homogeneous, affine, composition, vector-spaces, rotation.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages