File:Gosper curve 4.svg
Original file (SVG file, nominally 640 × 640 pixels, file size: 24 KB)
Captions
Summary
[edit]DescriptionGosper curve 4.svg |
English: Gosper curve of degree 4. |
Date | |
Source | Own work |
Author | Autopilot |
Source
[edit]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;
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
width="640px" height="640px"
>
<polyline
stroke="red"
stroke-width="10"
fill="none"
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);
}
Licensing
[edit]This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication. | |
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
http://creativecommons.org/publicdomain/zero/1.0/deed.enCC0Creative Commons Zero, Public Domain Dedicationfalsefalse |
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 17:18, 30 September 2024 | 640 × 640 (24 KB) | Autopilot (talk | contribs) | without background element | |
17:17, 30 September 2024 | 640 × 640 (24 KB) | Autopilot (talk | contribs) | with svg version id | ||
17:15, 30 September 2024 | 640 × 640 (25 KB) | Autopilot (talk | contribs) | testing with an inkscape save plus an extra square | ||
17:14, 30 September 2024 | 640 × 640 (24 KB) | Autopilot (talk | contribs) | trying with a professional white background | ||
16:49, 30 September 2024 | 640 × 640 (24 KB) | Autopilot (talk | contribs) | thiner lines | ||
16:47, 30 September 2024 | 640 × 640 (24 KB) | Autopilot (talk | contribs) | Uploaded own work with UploadWizard |
You cannot overwrite this file.
File usage on Commons
There are no pages that use this file.
File usage on other wikis
The following other wikis use this file:
- Usage on en.wikipedia.org
Metadata
This file contains additional information such as Exif metadata which may have been added by the digital camera, scanner, or software program used to create or digitize it. If the file has been modified from its original state, some details such as the timestamp may not fully reflect those of the original file. The timestamp is only as accurate as the clock in the camera, and it may be completely wrong.
Width | 640px |
---|---|
Height | 640px |