Widget:Radar: Difference between revisions
From Elwiki
mNo edit summary |
mNo edit summary |
||
Line 4: | Line 4: | ||
<!--{nocache}--> | <!--{nocache}--> | ||
<!--{$step=2*$PI/$dim}--> | <!--{$step=2*$PI/$dim}--> | ||
<!--{for $i=1 to $dim}--> | |||
<!--{$deg=$PI/2+($i-1)*$step}--> | <!--{$deg=$PI/2+($i-1)*$step}--> | ||
<!--{math equation=" | <!--{math equation="cos(deg)" deg=$deg assign="x"}--> | ||
<!--{math equation="- | <!--{math equation="-sin(deg)" deg=$deg assign="y"}--> | ||
<!--{$x|cat:','|cat:$ | <!--{append var="xs" value=$x index=$i}--> | ||
<!--{append var="ys" value=$y index=$i}--> | |||
<!--{/for}--> | |||
<polygon stroke="#999" fill="transparent" points=" | |||
<--{for $i=1 to $dim}--> | |||
<!--{$xs[$i]}|cat:','|cat:$ys[$i]}--> | |||
<!--{/for}--> | <!--{/for}--> | ||
"></polygon> | "></polygon> |
Revision as of 03:48, 29 May 2020
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="600" height="600" viewBox="-300 -300 600 600"> <polygon stroke="#999" fill="transparent" points=" <--{for $i=1 to $dim}--> "></polygon> </svg>