1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-17 14:18:13 +01:00
dotSCAD/docs/lib2x-m_translation.md

23 lines
453 B
Markdown
Raw Normal View History

2019-05-02 10:11:50 +08:00
# m_translation
2019-06-24 07:29:42 +08:00
The dir changed since 2.0.
2019-05-02 10:11:50 +08:00
Generate a 4x4 transformation matrix which can pass into `multmatrix` to translates (moves) its child elements along the specified vector.
2019-05-02 10:44:19 +08:00
**Since:** 1.1
2019-05-02 10:11:50 +08:00
## Parameters
2019-05-02 10:14:39 +08:00
- `v` : Elements will be translated along the vector.
2019-05-02 10:11:50 +08:00
## Examples
2020-01-28 17:51:20 +08:00
use <matrix/m_translation.scad>;
2019-05-02 10:11:50 +08:00
cube(2, center = true);
multmatrix(m_translation([5, 0, 0]))
2019-06-22 13:52:07 +08:00
sphere(1);
2019-05-02 10:11:50 +08:00
2020-03-30 20:13:47 +08:00
![m_translation](images/lib2x-m_translation-1.JPG)
2019-05-02 10:11:50 +08:00