Skip to content
Snippets Groups Projects
Commit a0401a85 authored by Neil Gershenfeld's avatar Neil Gershenfeld
Browse files

try perturbing vertices to remove slice degeneracies

parent 756cd52a
No related branches found
No related tags found
No related merge requests found
......@@ -422,6 +422,7 @@ function worker() {
//
// function to rotate point
//
var delta = (xmax-xmin)/(10*w)
function rotate(x,y,z) {
var x1 = x
var y1 = Math.cos(rx)*y-Math.sin(rx)*z
......@@ -432,6 +433,13 @@ function worker() {
var x3 = Math.cos(rz)*x2-Math.sin(rz)*y2
var y3 = Math.sin(rz)*x2+Math.cos(rz)*y2
var z3 = z2
//
// perturb by lattice resolution
// to remove slice degeneracies
//
x3 += delta
y3 += delta
z3 += delta
return([x3,y3,z3])
}
//
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment