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

wip

parent 590bbfcb
No related branches found
No related tags found
No related merge requests found
...@@ -229,28 +229,25 @@ function calculate_path() { ...@@ -229,28 +229,25 @@ function calculate_path() {
// //
var step = 1 var step = 1
var ix = 0 var ix = 0
var iy = 0 var iy = 10
var x1 = mod.xmin+(mod.xmax-mod.xmin)*ix/(mod.width-1)
var y1 = mod.ymin+(mod.ymax-mod.ymin)*iy/(mod.height-1)
while (1) { while (1) {
var x = mod.xmin+(mod.xmax-mod.xmin)*ix/(mod.width-1)
var y = mod.ymin+(mod.ymax-mod.ymin)*iy/(mod.height-1)
console.log(x,y)
ix += step ix += step
if (ix == mod.width) if (ix == mod.width)
break; break;
} var x2 = mod.xmin+(mod.xmax-mod.xmin)*ix/(mod.width-1)
var y2 = mod.ymin+(mod.ymax-mod.ymin)*iy/(mod.height-1)
var line = document.createElementNS('http://www.w3.org/2000/svg','line') var line = document.createElementNS('http://www.w3.org/2000/svg','line')
line.setAttribute('stroke','black') line.setAttribute('stroke','black')
line.setAttribute('stroke-width',1) line.setAttribute('stroke-width',1)
line.setAttribute('stroke-linecap','round') line.setAttribute('stroke-linecap','round')
var x1 = 0
var y1 = 0
var x2 = mod.width
var y2 = mod.height
line.setAttribute('x1',x1) line.setAttribute('x1',x1)
line.setAttribute('y1',y1) line.setAttribute('y1',y1)
line.setAttribute('x2',x2) line.setAttribute('x2',x2)
line.setAttribute('y2',y2) line.setAttribute('y2',y2)
g.appendChild(line) g.appendChild(line)
}
mod.label.nodeValue = 'calculate' mod.label.nodeValue = 'calculate'
mod.labelspan.style.fontWeight = 'normal' mod.labelspan.style.fontWeight = 'normal'
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment