creative technology
[]
readme
new(s)
masterclass
workshop(s)
CA1
CA2
CA3
CA4
CA5
project(s)
NM1
NM2
NM3
NM4
NM5
resource(s)
_
/ .
math-svg
/
/ [-]
/ [@cfg-math-svg]
/ math-svg.cfg
<script type="text/javascript" src="cfg/math/mathsvg.js"></script></script>
<embed width="600" height="300" src="../media/d.svg"
script='
initPicture(-3,3,-3,3)
axes(1,1,"labels",1)
// a = 1.5
update()
'>
parameter(s)
<script>
function setfv() {
f=document.getElementById('fv').value;
}
a = 2.5;
xmode = 0;
thestroke = "blue";
toggle(s)
function toggle() {
if (xmode == 1) { thestroke = "blue"; xmode = 0; }
else { thestroke = "red"; xmode = 1; }
// alert("update");
update();
}
function xstroke() { return thestroke; }
update(s)
function update () {
f=document.getElementById('fv').value;
p = []
with (Math)
for (var x = -a; x < a+.1; x += .1)
// p[p.length] = [x, x-x*x*x]
p[p.length] = [x, eval(f)]
stroke = xstroke()
//path(p,"func")
//stroke = "blue"
plot(f,-a,a)
setText(f,"fval")
setText(a.toFixed(2),"aval")
setText((-a).toFixed(2),"maval")
}
</script>
description(s)
<br>
<h6>
y=<span id="fval">f</span>
<input type="text" id="fv" name="fname" value="x" onblur="toggle()" />
for <span id="maval">a <=x<= a</span>
<input type="button" value="-" onclick="a-=.25;update()"/>
<input type="button" value="+" onclick="a+=.25;update()"/>
</h6>

[]
readme
new(s)
masterclass
workshop(s)
CA1
CA2
CA3
CA4
CA5
project(s)
NM1
NM2
NM3
NM4
NM5
resource(s)
_
/ .
(C) Æliens
09/09/09
creativetechnology.eu