Skip to content
Snippets Groups Projects
Commit 3555f19e authored by Sean Hickey's avatar Sean Hickey
Browse files

Updated pot and profile modules

parent 9439447c
No related branches found
No related tags found
No related merge requests found
......@@ -141,6 +141,17 @@
// Construct an updated profile given the number of layers specified
// using linear interpolation
var geomPoints = [];
// Construct the base
var firstPt = mod.points[0];
var firstX = firstPt.x;
var numSprials = Math.floor((firstX * +(mod.widthInput.value)) / 3.0);
for ( var spiral = 0; spiral < numSprials; ++spiral) {
var spiralX = (3.0 * spiral) + 2.0;
geomPoints.push(new THREE.Vector2( spiralX, 0 ));
}
// Construct the rest of the layers
var layers = mod.layersInput.value;
for ( var i = 0; i < layers; ++i ) {
var scaledLayerIndex = (i / layers) * (mod.points.length - 1);
......
......@@ -79,7 +79,7 @@
for (var i = 1; i < TOTAL_POINTS; ++i) {
points.push({
x: (400 * (i / TOTAL_POINTS)),
y: (600 * (i / TOTAL_POINTS) * (i / TOTAL_POINTS))
y: (600 * (i / TOTAL_POINTS))
})
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment