Skip to content

Commit

Permalink
This are new chages to the development
Browse files Browse the repository at this point in the history
  • Loading branch information
juanfbl9307 committed Jun 17, 2021
1 parent 31e1433 commit 778788c
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions pipeexcersice/pipe.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,7 @@ function getResults() {
}
}
graphGradient(min, max, velMin, diameter);
console.log(min)
console.log(max)
console.log(velMin)
console.log(diameter)


result.innerHTML += "Minimun diameter = " + diameter + " (mm)<br/>"
}
Expand Down Expand Up @@ -218,12 +215,13 @@ function graphGradient(vmin, vmax, vel, diameter) {
text.font = "15px Arial";
text.fillText("Vmin", 0, 120);
text.fillText("Vmax", 260, 120);
text.fillText(diameter, (300 * ((vmax - vmin) / (vel - vmin))), 30);
var xDistance = 300 * (((vmax - vmin) / (vel - vmin))/100)
text.fillText(diameter, (xDistance)-10, 30);
//lines in canvas
lines = canvas.getContext("2d");
lines.beginPath();
lines.moveTo(200, 40);
lines.lineTo(200, 130);
lines.moveTo(xDistance, 40);
lines.lineTo(xDistance, 130);
lines.stroke();
///Graphic of gradient
graphic = canvas.getContext("2d");
Expand Down

0 comments on commit 778788c

Please sign in to comment.