File:Concentric circles drawn with Bresenham's circle algorithm.png
Concentric_circles_drawn_with_Bresenham's_circle_algorithm.png (301 × 301 pixels, file size: 5 KB, MIME type: image/png)
Captions
Summary
[edit]DescriptionConcentric circles drawn with Bresenham's circle algorithm.png |
English: The midpoint circle algorithm, also known as Bresenham's circle algorithm, run 150 times, each time with one pixel bigger to create the final image of "concentric" circles. In this case different colors were used to more obviously show the concentricity of the circles.
Source code: |
Date | |
Source | Own work |
Author | Psiĥedelisto |
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 |
Source code
[edit]The below source code is GFDL 1.2-licensed. Repository by User:Psiĥedelisto.
from rcbitmap import Bitmap
from rcbitmap import BLACK, WHITE, RED, GREEN, BLUE, TRANSPARENT
WIDTH = HEIGHT = 301
bitmap = Bitmap(WIDTH, HEIGHT, background=TRANSPARENT)
colours = list()
for i in range(0,25):
colours.append(BLACK if i%2 else RED)
for i in range(0,25):
colours.append(BLACK if math.ceil(i/2)%2 else RED)
for i in range(0,5):
colours.append(RED)
for i in range(0,5):
colours.append(BLACK)
for i in range(0,150-len(colours)):
colours.append(BLUE if math.floor(i/18)%2 else RED)
assert len(colours) == 150, "Not enough colours"
for i in range(1, 151):
bitmap.circle(x0=(WIDTH//2), y0=(HEIGHT//2), radius=i, colour=colours[i-1])
bitmap.xpm()
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:52, 13 December 2020 | 301 × 301 (5 KB) | Psiĥedelisto (talk | contribs) | New version after email complaint. Source code: https://github.com/ctrlcctrlv/Midpoint-circle-algorithm-Wikipedia-images/blob/main/multicolor_circle.py | |
09:49, 25 November 2018 | 295 × 295 (13 KB) | Psiĥedelisto (talk | contribs) | User created page 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.
File change date and time | 17:06, 13 December 2020 |
---|