From 938dddb6b23b7a4153e0c03cc97f74f70007adcc Mon Sep 17 00:00:00 2001 From: rambetter Date: Fri, 31 Dec 2010 00:28:39 +0000 Subject: [PATCH] In branch Rambetter-math-fix-experiments. Simplifying segmentation_fault and adding some random notes for regression tests. git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/branches/Rambetter-math-fix-experiments@387 8a3a26a2-13c4-0310-b231-cf6edde360e5 --- .../q3map2/disappearing_sliver3/NOTES.txt | 36 +++++++++++++++++++ .../q3map2/segmentation_fault/README.txt | 10 ++++++ .../maps/segmentation_fault.map | 1 - 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 regression_tests/q3map2/disappearing_sliver3/NOTES.txt diff --git a/regression_tests/q3map2/disappearing_sliver3/NOTES.txt b/regression_tests/q3map2/disappearing_sliver3/NOTES.txt new file mode 100644 index 0000000..aebd534 --- /dev/null +++ b/regression_tests/q3map2/disappearing_sliver3/NOTES.txt @@ -0,0 +1,36 @@ +Random notes for Rambetter, don't expect to understand this: +============================================================ + +Brush 0 is the problem. + +Side 0 is the problem (under surf tri). +Side 1 is the +y 4-face. +Side 2 is the -x 4-face. +Side 3 is the -y 4-face. +side 4 is the +z tri. + +(6144, 16122) -> (6784, 16241) +x "climb" of side 1 is 6784 - 6144 = 640. +y "climb" of side 1 is 16241 - 16122 = 119. + +x/y "climb rate" of side 1 is 640 / 119 = 5.378151261. + +After clipping side 0 against side 1, we get +************ +**** (-262144, -33762.8125) -> (262144, 63722) +************ +The slope of that is (262144 + 262144) / (63722 + 33762.8125) = 5.378150571. + +(-262144, y) -> (6784, 16241) +So (6784 + 262144) / (16241 - y) = 640 / 119 +So y = 16241 - ((119 * (6784 + 262144)) / 640) = -33762.8 + +(6144, 16122) -> (262144, y) +So (262144 - 6144) / (y - 16122) = 640 / 119 +So y = 16122 + ((119 * (262144 - 6144)) / 640) = 63722 + +After clipping side 0 against side 1 should have +************ +**** (-262144, -33762.8) -> (262144, 63722) +************ + diff --git a/regression_tests/q3map2/segmentation_fault/README.txt b/regression_tests/q3map2/segmentation_fault/README.txt index 28eb3c7..4ea1622 100644 --- a/regression_tests/q3map2/segmentation_fault/README.txt +++ b/regression_tests/q3map2/segmentation_fault/README.txt @@ -12,6 +12,16 @@ To trigger the bug, compile the map; you don't need -vis or -light. Only entities in the map are a light and a info_player_deathmatch, so the map will compile for any Q3 mod. +Here is a description of the problem brush (brush #0): + + side 0: -z face + side 1: +z face + side 2: -y face + side 3: +x face + side 4: +y face + side 5: -x face + side 6: problem side "accidentally showed up" :-) + SOLUTION TO PROBLEM: ==================== diff --git a/regression_tests/q3map2/segmentation_fault/maps/segmentation_fault.map b/regression_tests/q3map2/segmentation_fault/maps/segmentation_fault.map index 218e6c1..6a0aeca 100644 --- a/regression_tests/q3map2/segmentation_fault/maps/segmentation_fault.map +++ b/regression_tests/q3map2/segmentation_fault/maps/segmentation_fault.map @@ -10,7 +10,6 @@ ( 10328 17727 -576 ) ( 10272 17727 -576 ) ( 10272 17727 -1600 ) radiant_regression_tests/tile 0 0 0 0.500000 0.500000 134217728 257 0 ( 10240 17608 -576 ) ( 10240 17480 -576 ) ( 10240 17480 -1600 ) radiant_regression_tests/tile 0 0 0 0.500000 0.500000 134217728 257 0 ( 10240 17727 -576 ) ( 10240 17726 -621 ) ( 10335 17727 -576 ) radiant_regression_tests/tile 0 0 0 0.500000 0.500000 134217728 257 0 -( 10272 17472 -592 ) ( 10240 17504 -592 ) ( 10272 17472 -576 ) radiant_regression_tests/tile 0 0 0 0.500000 0.500000 134217728 257 0 } // brush 1 {