For faster navigation, this Iframe is preloading the Wikiwand page for File:Sierpinski triangle.svg.

File:Sierpinski triangle.svg

Original file(SVG file, nominally 1,024 × 887 pixels, file size: 3 KB)

Summary

 
The SVG code is valid.
 
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

w:en:Creative Commons
attribution share alike
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

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

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current01:12, 4 March 2013Thumbnail for version as of 01:12, 4 March 20131,024 × 887 (3 KB)Perhelionrev: unnecessary excessive code, used original code
10:23, 2 August 2012Thumbnail for version as of 10:23, 2 August 2012720 × 540 (3.61 MB)Renamed user 5zaev7b64wx8mg6tyremove axes
15:51, 1 August 2012Thumbnail for version as of 15:51, 1 August 2012720 × 540 (4.35 MB)Renamed user 5zaev7b64wx8mg6tyFully remade image
07:12, 8 June 2012Thumbnail for version as of 07:12, 8 June 20121,774 × 1,536 (3 KB)OgreBot(BOT): Reverting to most recent version before archival
07:12, 8 June 2012Thumbnail for version as of 07:12, 8 June 20121,774 × 1,536 (3 KB)OgreBot(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 2012Thumbnail for version as of 07:12, 8 June 20121,774 × 1,536 (3 KB)OgreBot(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 2009Thumbnail for version as of 08:35, 30 December 20091,774 × 1,536 (3 KB)Tgr((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

File usage

The following pages on the English Wikipedia use this file (pages on other projects are not listed):

Global file usage

The following other wikis use this file:

Metadata

{{bottomLinkPreText}} {{bottomLinkText}}
File:Sierpinski triangle.svg
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?