Colorful circles: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) mNo edit summary |
||
Line 37: | Line 37: | ||
strokeColor:JXG.hsv2rgb(h,s,v), | strokeColor:JXG.hsv2rgb(h,s,v), | ||
fillColor:JXG.hsv2rgb((h+180)%360,s,v), | fillColor:JXG.hsv2rgb((h+180)%360,s,v), | ||
fillOpacity:0.7 | highlightFillColor:JXG.hsv2rgb(h,s,v), | ||
fillOpacity:0.7, | |||
highlightFillOpacity:0.4 | |||
}); | }); | ||
} | } | ||
</source> | </source> | ||
[[Category:Examples]] |
Revision as of 10:11, 22 September 2009
The underlying JavaScript code
var brd = JXG.JSXGraph.initBoard('jxgbox', {boundingbox:[-0.1,1.1,1.1,-0.1]});
var i, h, s, v;
for (i=0;i<30;i++) {
h = Math.random()*360
s = Math.random();
v = 1.0;
brd.createElement('point',[Math.random(),Math.random()],
{
withLabel:false,
face:'circle',
size:Math.random()*100,
strokeColor:JXG.hsv2rgb(h,s,v),
fillColor:JXG.hsv2rgb((h+180)%360,s,v),
highlightFillColor:JXG.hsv2rgb(h,s,v),
fillOpacity:0.7,
highlightFillOpacity:0.4
});
}