File:Sierpinski triangle.svg
From Wikimedia Commons, the free media repository
Jump to navigation
Jump to search
Size of this PNG preview of this SVG file: 692 × 599 pixels. Other resolutions: 277 × 240 pixels | 554 × 480 pixels | 887 × 768 pixels | 1,182 × 1,024 pixels | 2,364 × 2,048 pixels | 1,024 × 887 pixels.
Original file (SVG file, nominally 1,024 × 887 pixels, file size: 3 KB)
File information
Structured data
Captions
Summary
[edit]This plot was created with Matplotlib.
Source code
InfoField
Python code
from __future__ import division
import matplotlib.pyplot as plt
plt.figure()
plt.subplot(1,1,1)
plt.axis('off')
def drawBlue(p1,p2,p3):
plt.fill([p1[0],p2[0],p3[0]],[p1[1],p2[1],p3[1]],facecolor='b',edgecolor='none')
def drawWhite(p1,p2,p3):
plt.fill([p1[0],p2[0],p3[0]],[p1[1],p2[1],p3[1]],facecolor='w',edgecolor='none')
def midpoint(p1,p2):
return ((p1[0]+p2[0])/2,(p1[1]+p2[1])/2)
def sierpinski(p1,p2,p3,repeat):
drawWhite(midpoint(p1,p2),midpoint(p2,p3),midpoint(p3,p1))
if (repeat <= 8):
sierpinski(p1,midpoint(p1,p2),midpoint(p1,p3),repeat+1)
sierpinski(p2,midpoint(p1,p2),midpoint(p2,p3),repeat+1)
sierpinski(p3,midpoint(p1,p3),midpoint(p2,p3),repeat+1)
drawBlue((0,0),(7,0),(3.5,6.0621778265))
sierpinski((0,0),(7,0),(3.5,6.0621778265),0)
plt.show()
Licensing
[edit]This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
Attribution: Beojan Stanislaus
- You are free:
- to share – to copy, distribute and transmit the work
- to remix – to adapt the work
- Under the following conditions:
- attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
Original upload log
[edit]The original description page was here. All following user names refer to en.wikipedia.
Transferred to Commons.
Upload date | User | Bytes | Dimensions | Comment |
---|---|---|---|---|
2007-10-21 06:40:53 | Marco Polo | 2976 | 1774×1536 | typo |
2007-10-21 06:39:47 | Marco Polo | 2976 | 1774×1536 | Recursive algorithm for generation |
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 01:12, 4 March 2013 | 1,024 × 887 (3 KB) | Perhelion (talk | contribs) | rev: unnecessary excessive code, used original code | |
10:23, 2 August 2012 | 720 × 540 (3.61 MB) | Renamed user 5zaev7b64wx8mg6ty (talk | contribs) | remove axes | ||
15:51, 1 August 2012 | 720 × 540 (4.35 MB) | Renamed user 5zaev7b64wx8mg6ty (talk | contribs) | Fully remade image | ||
07:12, 8 June 2012 | 1,774 × 1,536 (3 KB) | OgreBot (talk | contribs) | (BOT): Reverting to most recent version before archival | ||
07:12, 8 June 2012 | 1,774 × 1,536 (3 KB) | OgreBot (talk | contribs) | (BOT): Uploading old version of file from en.wikipedia; originally uploaded on 2007-10-21 06:40:53 by Marco Polo | ||
07:12, 8 June 2012 | 1,774 × 1,536 (3 KB) | OgreBot (talk | contribs) | (BOT): Uploading old version of file from en.wikipedia; originally uploaded on 2007-10-21 06:39:47 by Marco Polo | ||
08:35, 30 December 2009 | 1,774 × 1,536 (3 KB) | Tgr (talk | contribs) | {{BotMoveToCommons|en.wikipedia|year={{subst:CURRENTYEAR}}|month={{subst:CURRENTMONTHNAME}}|day={{subst:CURRENTDAY}}}} == Summary == Recursive algorithm for generation == Licensing == {{PD-self|date = October 2007}} == Original upload history == This fi |
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 ar.wikipedia.org
- Usage on bg.wikipedia.org
- Usage on ca.wikipedia.org
- Usage on da.wikipedia.org
- Usage on el.wikipedia.org
- Usage on en.wikipedia.org
- Usage on en.wikiversity.org
- Usage on en.wiktionary.org
- Usage on fa.wikipedia.org
- Usage on fr.wikipedia.org
- Usage on he.wikipedia.org
- Usage on hu.wikipedia.org
- Usage on hy.wikipedia.org
- Usage on id.wikipedia.org
- Usage on ja.wikipedia.org
- Usage on ro.wikipedia.org
- Usage on ru.wikipedia.org
- Usage on sr.wikipedia.org
- Usage on sr.wiktionary.org
- Usage on zh.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 | 1024px |
---|---|
Height | 886.6px |