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.
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.
- 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
- Vector spaces, subspaces, linear independence, bases, and dimension
- Manipulate a cube with
Vector3,add(), andmultiplyScalar() - 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
- 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
- Move beyond MML into the Three.js rendering pipeline
- Understand why 3D graphics uses 4×4 matrices and what the
wcomponent represents - Deconstruct the
PerspectiveCameraprojection matrix - Build: A scene that reveals each stage of Model → View → Projection
- Inner products, norms, distances, angles, orthogonality, and projections
- Use
Raycasterfor 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
- 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
- Enable
renderer.xracross 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
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.
npm install
npm run dev기본 화면 또는 ?exercise=mvp에서 실행한다. 왼쪽은 월드 관찰용 카메라, 오른쪽은 학습 카메라의 실제 화면이다. 왼쪽 드래그는 관찰 시점만 바꾼다. 노란 로컬 점 (1, 1, 0, 1)의 좌표를 표에서 따라간다.
- 기본 배치: 물체는 Z = −4, 카메라는 원점. 카메라 좌표
(1, 1, −4, 1)과 클립의w′ = 4를 확인한다. - 카메라 X를 +1로 이동: 점의 카메라 X는 0이 되고 화면 가운데 세로선으로 이동한다.
- 물체 Z를 −8로 이동: 깊이가 커지면 화면에서 점이 중심에 가까워지고 물체가 작아진다.
- 카메라 Y축 회전을 바꿔 축을 기준으로 좌표를 읽는 과정을 비교한다. 양의 회전은 오른손 규칙을 따른다.
- 시야각을 바꾸고 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.