Colorful circles: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 4: | Line 4: | ||
for (i=0;i< | for (i=0;i<20;i++) { | ||
var h = Math.random()*360; | |||
var s = Math.random(); | |||
var v = Math.random(); | |||
brd.createElement('point',[Math.random(),Math.random()], | brd.createElement('point',[Math.random(),Math.random()], | ||
{withLabel:false, face:'circle', size:Math.random()*100}); | {withLabel:false, face:'circle', | ||
size:Math.random()*100, | |||
strokeColor:brd.hsv2rgb(h,s,v), | |||
fillColor:brd.hsv2rgb((h+180)%360,s,v) | |||
}); | |||
} | } | ||
</jsxgraph> | </jsxgraph> |