Anonymous

Widget:Radar: Difference between revisions

From Elwiki
m
no edit summary
mNo edit summary
mNo edit summary
Line 4: Line 4:
         <!--{nocache}-->
         <!--{nocache}-->
         <!--{$step=2*$PI/$dim}-->
         <!--{$step=2*$PI/$dim}-->
         <polygon x="250" y="250" fill="transparent" stroke="#999" points="
         <!--{for $i=1 to $dim}-->
            <!--{for $i=1 to $dim}-->
             <!--{$deg=$PI/2+($i-1)*$step}-->
             <!--{$deg=$PI/2+($i-1)*$step}-->
             <!--{math equation="200*cos(deg)" deg=$deg assign="x"}-->
             <!--{math equation="cos(deg)" deg=$deg assign="x"}-->
             <!--{math equation="-200*sin(deg)" deg=$deg assign="y"}-->
             <!--{math equation="-sin(deg)" deg=$deg assign="y"}-->
             <!--{$x|cat:','|cat:$y}-->
             <!--{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>