Skip to main content
Cập nhật lần cuối: 14/05/2026

Module 2 — Hình Học trong Grasshopper

Thời lượng: ~6 giờ · Độ khó: Cơ bản

Mục tiêu: Tạo và kiểm soát mọi loại geometry từ GH definition — từ điểm và vector đến surface phức tạp.


2A — Points và Vectors

Construct/Deconstruct Point

Construct Point: X, Y, Z → Point
Deconstruct: Point → X, Y, Z (tách ra 3 giá trị)

Grids (Lưới Điểm)

Rectangular Grid:
Component: Rectangular Grid (hoặc "Rect Grid")
Input: Plane + Size X + Size Y + Count X + Count Y
Output: Cells (rectangles) + Points (corners)

Hexagonal Grid:
Component: Hexagonal Grid
Input: Plane + Size + Count X + Count Y
Output: Cells (hexagons) + Points (centers)

Unit Vector và Vector Math

Unit X / Unit Y / Unit Z → vector đơn vị theo trục
Amplitude: Vector + Length → vector cùng hướng, độ dài mới
Unit Vector: Vector bất kỳ → normalize về length = 1
Cross Product: 2 vectors → vector vuông góc với cả 2
Dot Product: 2 vectors → số (projection)

Plane Types

XY Plane:      mặt phẳng Z=0
YZ Plane: mặt phẳng X=0
XZ Plane: mặt phẳng Y=0
Plane Origin: Plane → lấy điểm gốc
Construct Plane: Origin + X-axis + Y-axis → Plane tùy chỉnh

2B — Curves trong GH

Tạo Curves

Line:          Start Point + End Point
Circle: Plane + Radius
Arc: Plane + Radius + Angle domain
Interpolate: List of Points → smooth curve đi qua tất cả điểm
Polyline: List of Points → đường gấp khúc

Phân Tích Curves

Divide Curve:      Curve + N → N+1 điểm cách đều
Curve Closest Pt: Curve + Point → điểm gần nhất
Evaluate Curve: Curve + Parameter (0→1) → Point + Tangent
Curve Frame: Curve + Parameter → local Plane tại điểm đó
Length: Curve → chiều dài
Hình minh họa

[Ảnh: Divide Curve tạo 10 điểm đều → Curve Frame tại mỗi điểm → planes]


2C — Surfaces trong GH

Tạo Surfaces

Extrude:   Curve + Direction Vector → Surface
Revolve: Curve + Axis + Angle → Surface xoay
Loft: List of Curves → Surface
Sweep1: Rail + Profile → Surface

Phân Tích Surfaces

Divide Surface:    Surface + U + V → UV grid của points + frames
Evaluate Surface: Surface + UV → Point + Normal
Isotrim: Surface + UV Domain → sub-surface (1 ô UV)
Area: Surface → diện tích + centroid

Workflow quan trọng: Divide Surface + Isotrim

Surface → Divide Surface (U=5, V=5)
→ 5×5 = 25 UV cells
Isotrim (Surface, UV cell) → 25 sub-surfaces riêng biệt
→ Có thể xử lý mỗi ô độc lập (scale, rotate, replace bằng pattern...)

2D — Solids trong GH

Tạo Solids

Box:         Base Plane + Width + Depth + Height
Cylinder: Base Plane + Radius + Height
Sphere: Center + Radius
Cone: Base Plane + Radius + Height

Boolean trong GH

Solid Union:        A + B → hợp
Solid Difference: A - B → trừ
Solid Intersection: A ∩ B → giao

Deconstruct Brep

Deconstruct Brep: Brep → Faces (surfaces) + Edges (curves) + Vertices (points)
Dùng để: lấy từng face của solid để xử lý riêng

2E — Quy Trình Parametric Modelling

3 Bước Cơ Bản

Step 1: ANALYZE (Phân Tích)
Hiểu bài toán → xác định inputs (sliders) và outputs (geometry)

Step 2: BUILD (Xây Dựng)
Viết GH definition từng bước theo logic
Input → Processing → Output

Step 3: TEST (Kiểm Tra)
Kéo sliders → xem kết quả có đúng không
Debug bằng Panel → tìm chỗ sai

Khi Nào Ở Lại GH vs. Bake

Ở trong GH khi:
- Vẫn đang thử nghiệm
- Geometry sẽ cần tái tạo nhiều lần (slider-driven)
- Cần analysis hoặc computation thêm

Bake khi:
- Đã quyết định design cuối cùng
- Cần làm việc chi tiết trong Rhino (vật liệu, render)
- Cần export ra ngoài

Bài Tập Module 2 — Parametric Dome

Yêu cầu:

Inputs (sliders):
Radius: 5000 → 20000mm
Height: 3000 → 15000mm
U Panels: 4 → 20 (số ô theo kinh tuyến)
V Panels: 3 → 12 (số ô theo vĩ tuyến)

Workflow:
1. Sphere (Origin, Radius) → surface cầu
2. Trim bằng XY Plane → nửa cầu (hemisphere)
3. Scale chiều Z theo Height (so sánh bán kính vs chiều cao)
4. Divide Surface (U, V) → UV cells
5. Isotrim → list of panels
6. Area → tổng diện tích panels
7. Panel text: "Số panels: X | Tổng diện tích: Y m²"

Mở rộng:
8. Tạo đường viền mỗi panel (Brep Edges → Curve)
9. Bake panels vào layer "Dome-Panels"
10. Bake edges vào layer "Dome-Frame"

Liên kết kiến thức

Nền tảng cần nắm

Chủ đề liên quan