跳至內容

File:Gosper curve 3.svg

頁面內容不支援其他語言。
這個檔案來自維基共享資源
維基百科,自由的百科全書
原始檔案 (SVG 檔案,表面大小:320 × 320 像素,檔案大小:24 KB)


摘要

描述
English: Gosper curve of degree 4.
日期
來源 我個人以下列物件為基礎來創作: Gosper curve 3.png  Arbol01
作者
向量:
其他版本
本圖像有可用的柵格版本當其品質較佳時,就應該替代此矢量圖像。
File:Gosper curve 3.svgFile:Gosper curve 3.png

通常,最好使用好的矢量版本(SVG)。


Bitmap image
SVG開發
InfoField
 本SVG檔案的原始碼通過W3C驗證
 本vector image使用perl創作。

Source

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

#!/bin/perl
use Math::Trig;
# SVG Gosper curve generator by Blotwell
# Released under GFDL

my $x=500, $y=2500, $a=90;
my $ln=100;

printf <<HEREDOC, $x,$y;
<svg xmlns="http://www.w3.org/2000/svg"
	width="640px" height="640px"
>
<polyline
	stroke="black"
	stroke-width="30"
	stroke-linejoin="round"
	fill-opacity="0"
	transform="scale(0.1)"
	points="%i,%i,
HEREDOC

rg(4);
print <<HEREDOC;
"/>
</svg>
HEREDOC

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;}

sub gl {
	my $st=-1+shift;
	if ($st<0) {
		fd($ln);
		return
	}

	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);
		return;
	}

	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);
}

授權條款

Public domain 我,此作品的版權所有人,釋出此作品至公共領域。此授權條款在全世界均適用。
這可能在某些國家不合法,如果是的話:
我授予任何人有權利使用此作品於任何用途,除受法律約束外,不受任何限制。

說明

添加單行說明來描述出檔案所代表的內容

在此檔案描寫的項目

描繪內容

檔案歷史

點選日期/時間以檢視該時間的檔案版本。

日期/時間縮⁠圖尺寸使用者備⁠註
目前2025年3月22日 (六) 22:13於 2025年3月22日 (六) 22:13 版本的縮圖320 × 320​(24 KB)Ilzolenderemoving terminal comma that interferes with rendering, adding white background, other changes
2007年3月17日 (六) 19:10於 2007年3月17日 (六) 19:10 版本的縮圖320 × 320​(24 KB)BlotwellNewer version with one more sig. fig. in coördinates.
2007年3月17日 (六) 06:20於 2007年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 使用了這個檔案:

詮釋資料