Up | Example 1 : arrlib matrix math | Example 2 : Two-dimentional geometry | Example 3 : Member functions | Example 4 : Setting sub matrices | Example 5 : Locating peaks in a list

 

  

 
Example 2 : Two-dimentional geometry

Homogenous transforms

Rotate a vector of xyf elements by 1 radian around the point (5,0). For efficiency, the three transformation matrices are concatenated into one before post-multiplying the vector elements. (Of course, ~xlatf(-5,0) is the same as xlat(5,0)):

import arrlib as arr
v = arr.xyfVec(10)
for i in range(10): v[i] = i,0
w = v * (arr.xlatf(-5,0)*arr.rotf(1.0)*~arr.xlatf(-5,0))


 

Scorpion Vision Version XII : Build 646 - Date: 20170225
Scorpion Vision Software® is a registered trademark of Tordivel AS.
Copyright © 2000 - 2017 Tordivel AS.