-
-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tesselation is broken #353
Comments
The STL contains the following triangles, which have X and Y components 10x bigger than anything else in the file. Presumably these are the culprits: facet normal 7.808541e-1 -6.247135e-1 0.0e0
outer loop
vertex -3.200224e1 -3.1188211e0 -1.3e1
vertex 1.1662979e2 1.8266225e2 -1.3e1
vertex 4.2313778e1 8.977171e1 -1.2e1
endloop
endfacet
facet normal 7.808541e-1 -6.247135e-1 0.0e0
outer loop
vertex 1.1662979e2 1.8266225e2 -1.3e1
vertex 1.1662979e2 1.8266225e2 -1.1e1
vertex 4.2313778e1 8.977171e1 -1.2e1
endloop
endfacet
facet normal 7.808541e-1 -6.247135e-1 0.0e0
outer loop
vertex 1.1662979e2 1.8266225e2 -1.1e1
vertex -3.200224e1 -3.1188211e0 -1.1e1
vertex 4.2313778e1 8.977171e1 -1.2e1
endloop
endfacet
facet normal -7.846233e-1 6.1997277e-1 0.0e0
outer loop
vertex 1.1662979e2 1.8266225e2 -1.1e1
vertex 1.1662979e2 1.8266225e2 -1.3e1
vertex 4.289338e1 8.934312e1 -1.2e1
endloop
endfacet
facet normal -7.846233e-1 6.1997277e-1 0.0e0
outer loop
vertex 1.1662979e2 1.8266225e2 -1.3e1
vertex -3.0843039e1 -3.9760044e0 -1.3e1
vertex 4.289338e1 8.934312e1 -1.2e1
endloop
endfacet
facet normal -7.846233e-1 6.1997277e-1 0.0e0
outer loop
vertex -3.0843039e1 -3.9760044e0 -1.3e1
vertex -3.0843039e1 -3.9760044e0 -1.1e1
vertex 4.289338e1 8.934312e1 -1.2e1
endloop
endfacet
facet normal -7.846233e-1 6.1997277e-1 0.0e0
outer loop
vertex -3.0843039e1 -3.9760044e0 -1.1e1
vertex 1.1662979e2 1.8266225e2 -1.1e1
vertex 4.289338e1 8.934312e1 -1.2e1
endloop
endfacet
(search for |
Rendering the same object with resolutions |
At resolution 10: The vertex here is at |
I instrumented the triangle generation with this: mkTriangle :: (ℝ3, ℝ3, ℝ3) -> Triangle
mkTriangle (a, b, c) =
if abs a >= 3400
then markDebugger $ Triangle (a, b, c)
else Triangle (a, b, c)
markDebugger :: Triangle -> Triangle
markDebugger = id and then added a breakpoint to
|
some printf of the values in scope (ghci doesn't track this for some stupid reason) mid= V3 (-318.298453912407) (-5.033029043219576) 2.365568688888259
mid'= V3 (-65.49999999494523) 24165.67241446491 155.07559049902787
midval= 252.798453912407
deriv= 1.045809707875378e-2
normal= V3 (-1.0458097078962893e-2) (-0.9999253558637543) (-6.317507913012856e-3) |
The weird point comes from so maybe it's |
|
#355 is a better step here, but it's still not right |
Filing a new bug to act as a little notepad for myself.
The following object has a huge erroneous spike when rendered with resolution=2:
The text was updated successfully, but these errors were encountered: