Skip to content Skip to sidebar Skip to footer

How To Fix Inequality Glitch For Jsxgraph?

I'm currently drawing the log10 function on JSXgraph, however the shading glitches. This happens to log, rational, squareRoot functions. Screenshot Log10 function: var graph = boar

Solution 1:

Indeed, some function make problems. For rational functions I do not see an easy fix. For log- and sqrt-functions, you can set the defining interval slightly smaller so that it it doe not contain the critical points of the function:

sqrt-function:

var graph = board.create('functiongraph', [
    function (x) { returnMath.sqrt(x - a.Value()); }, 
    function() { return a.Value()+0.00001; }, 
    10
]);

log-function:

var graph = board.create('functiongraph', [
    function (x) { return a.Value()*Math.log10(x); }, 
    0.0001, 
    10
]);

As soon as there is a little time left, I will tackle this.

Post a Comment for "How To Fix Inequality Glitch For Jsxgraph?"