<>; for(<>){ ($t,$p,$w,$v,$gx,$gy)=glob; $v+=1; $r=sqrt($v*$v+$w*$w); $a=atan2($w,$v); $z=0; for(1..$t){ $z+=$r**(-2*$_); } { $c=cos($a*$t); $s=sin($a*$t); $dx=($gx/$r**$t-$c)/$z; $dy=($gy/$r**$t-$s)/$z; } for(1..$t){ $c=cos($a*($_-$t)); $s=sin($a*($_-$t)); $x=($dx*$c-$dy*$s)/$r**$_; $y=($dx*$s+$dy*$c)/$r**$_; print $x," ",$y,"\n"; } }