File:Gosper curve 3.svg

页面内容不支持其他语言。
這個文件來自維基共享資源
维基百科,自由的百科全书

原始文件(SVG文件,尺寸为320 × 320像素,文件大小:24 KB)


摘要

描述 Gosper curve of degree 4. Created by me as a vector replacement for .
日期 2007年3月17日 (原始上传日期)
来源 基于如下对象的个人作品: Gosper curve 3.png
作者
矢量:
SVG开发
InfoField
 
SVG的源代码为有效代码
 
矢量图使用perl创作。

Source

The SVG file is produced by the following Perl script, which is based on the Logo implementation at Gosper-Kurve.

<source lang="perl">

  1. !/bin/perl

use Math::Trig;

  1. SVG Gosper curve generator by Blotwell
  2. Released under GFDL

BEGIN{ print <<HEREDOC <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"

   "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
   <svg xmlns="http://www.w3.org/2000/svg"
        xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve"
               width="320px" height="320px"
                        viewBox="0 0 6400 6400">

HEREDOC

}

my $x=500, $y=2500, $a=90; printf "<polyline points=\"%i,%i,",$x,$y; sub p {printf "%i,%i,",$x,$y;} sub fd {my $n=shift; $x+=$n*cos(deg2rad($a)); $y-=$n*sin(deg2rad($a)); p();} sub tl {$a+=shift;} sub rt {$a-=shift;} my $ln=100; rg(4);

sub gl {my $st=-1+shift; if ($st<0) {fd($ln);} else {tl(60); rg($st); rt(60); gl($st); gl($st); rt(120); gl($st); rt(60); rg($st); tl(120); rg($st); tl(60); gl($st);}}

sub rg {my $st=-1+shift; if ($st<0) {fd($ln);} else {rg($st); rt(60); gl($st); rt(120); gl($st); tl(60); rg($st); tl(120); rg($st); rg($st); tl(60); gl($st); rt(60);}}

END{print '" stroke="black" stroke-width="30" stroke-linejoin="round" fill-opacity="0" />',"\n</svg>\n";} }} }}

许可协议

Public domain 我,本作品著作权人,释出本作品至公有领域。这适用于全世界。
在一些国家这可能不合法;如果是这样的话,那么:
我无条件地授予任何人以任何目的使用本作品的权利,除非这些条件是法律规定所必需的。

说明

添加一行文字以描述该文件所表现的内容

此文件中描述的项目

描繪內容

文件历史

点击某个日期/时间查看对应时刻的文件。

日期/时间缩⁠略⁠图大小用户备注
当前2007年3月17日 (六) 19:102007年3月17日 (六) 19:10版本的缩略图320 × 320(24 KB)BlotwellNewer version with one more sig. fig. in coördinates.
2007年3月17日 (六) 06:202007年3月17日 (六) 06:20版本的缩略图320 × 320(19 KB)BlotwellGosper curve of degree 4. Created by me as a vector replacement for Image:Gosper curve 3.png.

以下页面使用本文件:

全域文件用途

以下其他wiki使用此文件: