Rounding Errors in primitives?

RE: Rounding Errors in primitives?
#16
(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(' ');
« Next Oldest | Next Newest »

 Messages In This Thread Rounding Errors in primitives? - by Tery Hamer - 2021-03-25, 18:42 RE: Rounding Errors in primitives? - by Travis Cobbs - 2021-03-25, 19:43 RE: Rounding Errors in primitives? - by Philippe Hurbain - 2021-03-25, 19:45 RE: Rounding Errors in primitives? - by Tery Hamer - 2021-03-25, 23:34 RE: Rounding Errors in primitives? - by Chris Dee - 2021-03-26, 12:17 RE: Rounding Errors in primitives? - by Lasse Deleuran - 2021-04-29, 19:59 RE: Rounding Errors in primitives? - by Travis Cobbs - 2021-04-29, 20:14 RE: Rounding Errors in primitives? - by Lasse Deleuran - 2021-04-29, 20:43 RE: Rounding Errors in primitives? - by Lasse Deleuran - 2021-04-29, 20:48 RE: Rounding Errors in primitives? - by Magnus Forsberg - 2021-04-29, 20:54 RE: Rounding Errors in primitives? - by Lasse Deleuran - 2021-04-29, 21:44 RE: Rounding Errors in primitives? - by Magnus Forsberg - 2021-05-02, 19:45 RE: Rounding Errors in primitives? - by Magnus Forsberg - 2021-05-03, 15:57 RE: Rounding Errors in primitives? - by Lasse Deleuran - 2021-05-05, 8:33 RE: Rounding Errors in primitives? - by Lasse Deleuran - 2021-05-05, 8:50 RE: Rounding Errors in primitives? - by Magnus Forsberg - 2021-05-05, 15:29 RE: Rounding Errors in primitives? - by Orion Pobursky - 2021-05-06, 18:58 RE: Rounding Errors in primitives? - by Travis Cobbs - 2021-05-06, 18:48 RE: Rounding Errors in primitives? - by Lasse Deleuran - 2021-06-06, 11:49 RE: Rounding Errors in primitives? - by Travis Cobbs - 2021-06-06, 23:16 RE: Rounding Errors in primitives? - by Lasse Deleuran - 2021-06-10, 17:42 RE: Rounding Errors in primitives? - by Orion Pobursky - 2021-06-10, 17:59 RE: Rounding Errors in primitives? - by Lasse Deleuran - 2021-06-11, 8:02 RE: Rounding Errors in primitives? - by Travis Cobbs - 2021-04-29, 21:58

Forum Jump:

Users browsing this thread: 1 Guest(s)