(2021-05-02, 19:45)Magnus Forsberg Wrote: (...) Your second example, is correct compaired to the official file, but your calculation is not.
I want to learn how to perform the correct calculation, so that my testing framework can include these primitives as well.
Can you please tell me where I am making a wrong assumption below?
1-4ring5.dat consists of quads based on the points from 1-4edge.dat.
The points in 1-4edge.dat are those of the quarter circle with diameter 1:
1 0 0
0.9239 0 0.3827
0.7071 0 0.7071
0.3827 0 0.9239
0 0 1
1-4ring5.dat spans from the quarter circle of diameter 5 to the quarter circle of diameter 6. It consists of the following points:
5 0 0
4.6195 0 1.9135
3.5355 0 3.5355
1.9135 0 4.6195
0 0 5
6 0 0
5.5433 0 2.2961
4.2426 0 4.2426
2.2961 0 5.5433
0 0 6
By scaling the points from 1-4edge.dat with 5 and 6, respectively, we get:
5 0 0
4.6195 0 1.9135
3.5355 0 3.5355
1.9135 0 4.6195
0 0 5
6 0 0
5.5434 0 2.2962
4.2426 0 4.2426
2.2962 0 5.5434
0 0 6
Which differ from the points in the official file where highlighted.
Calculations done in JS console, by:
'1 0 0 0.9239 0 0.3827 0.7071 0 0.7071 0.3827 0 0.9239 0 0 1'.split(' ').map(x => 5*x).join(' ');
'1 0 0 0.9239 0 0.3827 0.7071 0 0.7071 0.3827 0 0.9239 0 0 1'.split(' ').map(x => 6*x).join(' ');