From 3f6a2f0fbb084267171c3798718d7184f5892355 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Tue, 13 Dec 2011 01:24:53 +0100 Subject: Improved sphere tesselation for low resolution spheres diff --git a/src/primitives.cc b/src/primitives.cc index 67e19c3..b3fa45f 100644 --- a/src/primitives.cc +++ b/src/primitives.cc @@ -327,7 +327,7 @@ PolySet *PrimitiveNode::evaluate_polyset(class PolySetEvaluator *) const }; int fragments = get_fragments_from_r(r1, fn, fs, fa); - int rings = fragments/2; + int rings = (fragments+1)/2; // Uncomment the following three lines to enable experimental sphere tesselation // if (rings % 2 == 0) rings++; // To ensure that the middle ring is at phi == 0 degrees diff --git a/tests/regression/opencsgtest/sphere-tests-expected.png b/tests/regression/opencsgtest/sphere-tests-expected.png index 06161f3..d11e3bf 100644 Binary files a/tests/regression/opencsgtest/sphere-tests-expected.png and b/tests/regression/opencsgtest/sphere-tests-expected.png differ diff --git a/tests/regression/opencsgtest/testcolornames-expected.png b/tests/regression/opencsgtest/testcolornames-expected.png index 6fc6569..6c1b107 100644 Binary files a/tests/regression/opencsgtest/testcolornames-expected.png and b/tests/regression/opencsgtest/testcolornames-expected.png differ diff --git a/tests/regression/throwntogethertest/sphere-tests-expected.png b/tests/regression/throwntogethertest/sphere-tests-expected.png index 4792668..d11e3bf 100644 Binary files a/tests/regression/throwntogethertest/sphere-tests-expected.png and b/tests/regression/throwntogethertest/sphere-tests-expected.png differ -- cgit v0.10.1