1

JSXGraph で関数グラフと直線の交点を定義しました。直線を移動すると、交差点の位置が期待どおりに更新されます。しかし、関数グラフを移動すると、交点が消えます。ここで特別な設定を行う必要がありますか? これはjsxgraphのバグですか? 問題の実例を次に示します。

http://maldive.ccnmtl.columbia.edu/js/functiongraph-intersection.html

コードは次のとおりです。

var l1 = board.create('line', [                                                                                                     
    [2.5, 2.5],                                                                                                                     
    [3.5, 3.5]                                                                                                                      
], {                                                                                                                                
    name: 'line 1',                                                                                                                 
    withLabel: true,                                                                                                                
    label: { position: 'rt', offset: [10, -20] },                                                                                   
    strokeColor: 'blue',                                                                                                            
    strokeWidth: 2,                                                                                                                 
    fixed: false                                                                                                                    
});                                                                                                                                 

var f = function(x) {                                                                                                               
    var alpha = 0.3;                                                                                                                
    return (1 - alpha) *                                                                                                            
        (1.4 *                                                                                                                      
         1.6 ** alpha) *                                                                                                            
        (x ** -alpha);                                                                                                              
};                                                                                                                                  

var l2 = board.create('functiongraph', [f], {                                                                                       
    name: 'line 2',                                                                                                                 
    withLabel: true,                                                                                                                
    strokeWidth: 2,                                                                                                                 
    strokeColor: 'orange',                                                                                                          
    fixed: false                                                                                                                    
});                                                                                                                                 

var i = board.create('intersection', [l1, l2, 0], {                                                                                 
    name: 'intersection',                                                                                                           
    fixed: true,                                                                                                                    
    showInfobox: false                                                                                                              
}); 
4

1 に答える 1