You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.0 KiB
38 lines
1.0 KiB
2 years ago
|
|
||
|
|
||
|
function restoreSettings(){
|
||
|
for (var i = 0; i < Infinity; i++){
|
||
|
if (getItem("fullDescription" + i) == null) break;
|
||
|
var g = new Graph(getItem("fullDescription" + i));
|
||
|
g.name = getItem("name" + i);
|
||
|
g.reference = getItem("reference" + i);
|
||
|
g.displayFunction = getItem("displayFunction" + i);
|
||
|
g.executeFunction = getItem("executeFunction" + i);
|
||
|
g.color = getItem("color" + i);
|
||
|
g.thickness = int(getItem("thickness" + i));
|
||
|
g.visible = boolean(getItem("visible" + i));
|
||
|
graphs.push(g);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
function safeSettings(){
|
||
|
|
||
|
}
|
||
|
|
||
|
function restoreStandard(){
|
||
|
if (graphs.length > 0){return;}
|
||
|
function restore(f, c, i){
|
||
|
var g = new Graph(f);
|
||
|
g.setColor(c);
|
||
|
graphs[i] = g;
|
||
|
}
|
||
|
restore("f(x)=x^3-2x", "#ffe602", 0);
|
||
|
restore("g(x)=(1 - x^2)^(1/2)", "#ff0202", 1);
|
||
|
restore("h(x)=e^(-x)", "#000000", 2);
|
||
|
restore("i(x)= 1/(x^2)", "#31ff04", 3);
|
||
|
restore("j(x)= |x| * x", "#0f02ff", 4);
|
||
|
restore("k(x)=log(x)", "#ff0be2", 5);
|
||
|
restore("l(x)= sin(2x)", "#02ffc6", 6);
|
||
|
restore("m(x)=cos(0.5x)", "#ff8d03", 7);
|
||
|
restore("n(x)=atan(x)", "#01cfff", 8);
|
||
|
}
|