try this…
Summary
function (pixelCount) {
var map = []
var zend = 0
var xoffset = 0
var offset = false
// map F64
zend = -60
if(offset) {xoffset = -5}
buildFermatSpiral(xoffset,0,.10,64,map,zend,0,1)
// map helix connecting each F64
var helixCount = (pixelCount-128);
zend = 20
angleoffset = 0
count = helixCount/2
zend = buildHelixMap(helixCount, map,zend,angleoffset,count)
zend = zend + 10
angleoffset = 0
zend = buildHelixMap(helixCount, map,zend,angleoffset,count)
// map F64
if(offset) {xoffset = 5}
buildFermatSpiral(xoffset,0,.10,64,map,zend+60,0,-1)
// fake extra pixels added to map to set the bounds of the
// coordinate space so the normalizer preserves aspect ratio
var scale = 2;
if(offset) {scale = 6}
map.push([-scale,-scale, -60])
map.push([scale,scale, zend+120])
return map;
}
function buildFermatSpiral(originX, originY, spacing, pixelCount,map, zend, angleoffset,cone) {
reallocation = [0, 13, 26, 39, 52, 57, 44, 31, 18, 5, 10, 23, 36, 49, 62, 54, 41, 28, 15, 2, 7, 20, 33, 46, 59, 51, 38, 25, 12, 4, 17, 30, 43, 56, 61, 48, 35, 22, 9, 1, 14, 27, 40, 53, 58, 45, 32, 19, 6, 11, 24, 37, 50, 63, 55, 42, 29, 16, 3, 8, 21, 34, 47, 60]
for (var i = 0; i < pixelCount; i++) {
r = spacing * Math.sqrt(reallocation[i]);
theta = reallocation[i] * 2.3998277 + angleoffset // golden angle
y = originY - (r * Math.sin(theta));
x = originX + (r * Math.cos(theta));
map.push([x, y, (cone*r*r*50)+zend])
}
}
function buildHelixMap(pixelCount,map,zend,angleoffset,count) {
var loops = 12
var helixCount = (pixelCount-128);
var rowCount = helixCount/35;
var lastZ = 0;
for (i = 0; i < count; i++) {
c = i / pixelCount * Math.PI * 2 * loops
c = c + angleoffset
lastZ = (i/rowCount) + zend;
map.push([Math.cos(c), Math.sin(c), lastZ])
}
return lastZ;
}
You’ll likely adjust the numbers (the angle offsets and spacing a bit… but it’s close
Btw, @wizard, this right here, the ability to create this sort of amazing mapping… THIS is why people should be using Pixelblaze.