(function() { var points = []; while( points.length < 5 ) { var point = [ randRange( -9, 9 ), randRangeExclude( -9, 9, [-1] ) ]; var isUnique = true; $.each( points, function( index, pt ) { if ( point[0] === pt[0] && point[1] === pt[1] ) { isUnique = false; return false; } }); if ( isUnique ) { points.unshift( point ); } } return points; })() randRange( 0, POINTS.length - 1 ) function( arr ) { return "(" + arr.join( ", " ) + ")"; }

Se dau următoarele puncte:

$.map( POINTS, PAIR ).join( "\\qquad" )

Care dintre acestea nu sunt prezente pe grafic ?

graphInit({ range: 10, scale: 20, axisArrows: "<->", tickStep: 1, labelStep: 2 }) $.each( POINTS, function( index, point ) { if ( index === FORGOTTEN ) { return; } style({ stroke: "#6495ED", fill: "#6495ED" }, function() { circle( point, 0.2 ); }); });

PAIR( POINTS[FORGOTTEN] )

  • PAIR( point )
label( point, PAIR( point ), "above right" );
var point = POINTS[FORGOTTEN]; label( point, PAIR( point ), "above right", { color: RED }); circle( point, 0.3, { stroke: RED } );

(POINTS[FORGOTTEN]) nu este prezent pe grafic.