コンテンツにスキップ
Wikipedia

ファイル:Symmetrical 5-set Venn diagram.svg

ページのコンテンツが他言語でサポートされていません。

元のファイル(SVG ファイル、512 ×ばつ 512 ピクセル、ファイルサイズ: 4キロバイト)

ウィキメディア・コモンズ
ウィキメディア・コモンズのファイルページにある説明を、以下に表示します。
W3C-validity not checked.

概要

解説Symmetrical 5-set Venn diagram.svg
English: Radially-symmetrical five-set Venn diagram devised by Branko Grünbaum
原典 投稿者自身による著作物
作者 Cmglee

Python script to optimise for maximum area of the smallest regions

#!/usr/bin/env python
import math
class Ellipse:
 def __init__(self, x,y, rx,ry):
 self.x = x
 self.y = y
 self.rx = rx
 self.ry = ry
class Matrix:
 def __init__(self, ellipse):
 self.half_width = max(int(math.ceil(ellipse.rx + ellipse.x) + 1),
 int(math.ceil(ellipse.ry + ellipse.y) + 1))
 self.half_height = self.half_width
 self.width = self.half_width * 2
 self.height = self.half_height * 2
 self.cells = [[0 for x in range(self.width)] for y in range(self.height)]
 def display(self):
 codes = '0123456789abcdefghijklmnopqrstuvwxyz'
 print('\n'.join([''.join([codes[self.cells[y][x]] for x in range(self.width)])
 for y in range(self.height)]))
 def draw_ellipse(self, i_bit, ellipse, angle):
 mask_bit = (1 << i_bit)
 sin_angle = math.sin(math.radians(angle))
 cos_angle = math.cos(math.radians(angle))
 for matrix_y in range(self.height):
 for matrix_x in range(self.width):
 cell_x_unrotated = matrix_x - self.half_width
 cell_y_unrotated = matrix_y - self.half_height
 cell_x = sin_angle * cell_y_unrotated + cos_angle * cell_x_unrotated
 cell_y = cos_angle * cell_y_unrotated - sin_angle * cell_x_unrotated
 cell_dx = float(cell_x - ellipse.x) / ellipse.rx
 cell_dy = float(cell_y - ellipse.y) / ellipse.ry
 # print('%3d%3d | %4d%4d | %6.2f%6.2f | %6.2f %d' %
 # (matrix_x,matrix_y, cell_x,cell_y, cell_dx,cell_dy,
 # cell_dx * cell_dx + cell_dy * cell_dy,cell_dx * cell_dx + cell_dy * cell_dy > 1))
 if (cell_dx * cell_dx + cell_dy * cell_dy <= 1): self.cells[matrix_y][matrix_x] |= mask_bit
 def draw_ellipses(self, ellipse):
 for i_ellipse in range(5): self.draw_ellipse(i_ellipse, ellipse, i_ellipse * 72)
 def count_regions(self):
 counts = [0 for code in range(1 << 5)]
 for matrix_y in range(self.height):
 for matrix_x in range(self.width):
 counts[self.cells[matrix_y][matrix_x]] += 1
 area_all = self.width * self.height
 area_min = area_all
 area_non0 = area_all - counts[0]
 for i_count in range(len(counts)):
 if (area_min > counts[i_count]): area_min = counts[i_count]
 if (True):
 # if (area_min > 0):
 bar = ''.join(['%-5d+----' % i for i in range(99)]).replace(' ','-')[1:]
 ppm = 1e6 * area_min / area_non0
 print('x:%2d y:%2d rx:%2d ry:%2d ppm:%4.0f%s' %
 (ellipse.x,ellipse.y, ellipse.rx,ellipse.ry, ppm, bar[:int(ppm / 100 + 0.5)]))
"""
ellipse = Ellipse(9,14, 40,80)
ellipse = Ellipse(7,16, 42,78)
ellipse = Ellipse(5,12, 46,70)
ellipse = Ellipse(5,14, 37,64)
ellipse = Ellipse(5,12, 40,65)
ellipse = Ellipse(5,12, 41,66)
ellipse = Ellipse(10,24, 82,132)
matrix = Matrix(ellipse)
matrix.draw_ellipses(ellipse)
matrix.display()
matrix.count_regions()
"""
model_x = 20; half_range_x = 1; step_x = 1
model_y = 46; half_range_y = 1; step_y = 1
model_rx = 166; half_range_rx = 1; step_rx = 1
model_ry = 264; half_range_ry = 1; step_ry = 1
for x in range(-half_range_x , half_range_x + 1, step_x ):
 for y in range(-half_range_y , half_range_y + 1, step_y ):
 for rx in range(-half_range_rx, half_range_rx + 1, step_rx):
 for ry in range(-half_range_ry, half_range_ry + 1, step_ry):
 ellipse = Ellipse(model_x + x,model_y + y, model_rx + rx,model_ry + ry)
 matrix = Matrix(ellipse)
 matrix.draw_ellipses(ellipse)
 matrix.count_regions()
# """

ライセンス

この作品の著作権者である私は、この作品を以下のライセンスで提供します。
w:ja:クリエイティブ・コモンズ
表示 継承
このファイルはクリエイティブ・コモンズ 表示-継承 3.0 非移植ライセンスのもとに利用を許諾されています。
あなたは以下の条件に従う場合に限り、自由に
  • 共有 – 本作品を複製、頒布、展示、実演できます。
  • 再構成 – 二次的著作物を作成できます。
あなたの従うべき条件は以下の通りです。
  • 表示 – あなたは適切なクレジットを表示し、ライセンスへのリンクを提供し、変更があったらその旨を示さなければなりません。これらは合理的であればどのような方法で行っても構いませんが、許諾者があなたやあなたの利用行為を支持していると示唆するような方法は除きます。
  • 継承 – もしあなたがこの作品をリミックスしたり、改変したり、加工した場合には、あなたはあなたの貢献部分を元の作品とこれと同一または互換性があるライセンスの下に頒布しなければなりません。
https://creativecommons.org/licenses/by-sa/3.0CC BY-SA 3.0 Creative Commons Attribution-Share Alike 3.0 truetrue

キャプション

このファイルの内容を1行で記述してください

このファイルに描写されている項目

題材

\u8457\u4f5c\u6a29\u306e\u72b6\u6cc1<\/a>"}},"text\/plain":{"ja":{"":"\u8457\u4f5c\u6a29\u306e\u72b6\u6cc1"}}},"{\"value\":{\"entity-type\":\"item\",\"numeric-id\":50423863,\"id\":\"Q50423863\"},\"type\":\"wikibase-entityid\"}":{"text\/html":{"ja":{"P6216":"\u8457\u4f5c\u6a29\u3067\u4fdd\u8b77<\/a>"}},"text\/plain":{"ja":{"P6216":"\u8457\u4f5c\u6a29\u3067\u4fdd\u8b77"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P6216 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">
\u5229\u7528\u8a31\u8afe<\/a>"}},"text\/plain":{"ja":{"":"\u5229\u7528\u8a31\u8afe"}}},"{\"value\":{\"entity-type\":\"item\",\"numeric-id\":14946043,\"id\":\"Q14946043\"},\"type\":\"wikibase-entityid\"}":{"text\/html":{"ja":{"P275":"CC BY-SA 3.0 \u975e\u79fb\u690d<\/a>"}},"text\/plain":{"ja":{"P275":"CC BY-SA 3.0 \u975e\u79fb\u690d"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P275 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">

ファイルの履歴

過去の版のファイルを表示するには、その版の日時をクリックしてください。

(最新 | 最古) (以後の10件 | ) (10 | 20 | 50 | 100 | 250 | 500 件) を表示
日付と時刻サムネイル寸法利用者コメント
現在の版2019年4月16日 (火) 00:17 2019年4月16日 (火) 00:17時点における版のサムネイル 512 ×ばつ 512 (4キロバイト)Cmglee Improve optimisation and rendering.
2016年10月14日 (金) 12:47 2016年10月14日 (金) 12:47時点における版のサムネイル 512 ×ばつ 512 (4キロバイト)Cmglee Optimise for maximum area of the smallest regions.
2011年4月11日 (月) 00:35 2011年4月11日 (月) 00:35時点における版のサムネイル 746 ×ばつ 742 (3キロバイト)AnonMoos adjusting margins
2011年3月11日 (金) 22:09 2011年3月11日 (金) 22:09時点における版のサムネイル 512 ×ばつ 512 (3キロバイト)Cmglee Use defs to make opaque lines.
2011年3月11日 (金) 21:49 2011年3月11日 (金) 21:49時点における版のサムネイル 512 ×ばつ 512 (3キロバイト)Cmglee Explicitly specify font size.
2011年3月11日 (金) 21:42 2011年3月11日 (金) 21:42時点における版のサムネイル 512 ×ばつ 512 (1キロバイト)Cmglee Make transparent fill attribute of ellipses.
2011年3月11日 (金) 21:40 2011年3月11日 (金) 21:40時点における版のサムネイル 512 ×ばつ 512 (1キロバイト)Cmglee Add opaque lines.
2011年3月11日 (金) 21:37 2011年3月11日 (金) 21:37時点における版のサムネイル 512 ×ばつ 512 (1,017バイト)Cmglee Use fill with hex codes and opacity instead of fill with rgba codes.
2011年3月11日 (金) 21:34 2011年3月11日 (金) 21:34時点における版のサムネイル 512 ×ばつ 512 (1,010バイト)Cmglee Temporarily remove text to check if ellipses work.
2011年3月11日 (金) 21:33 2011年3月11日 (金) 21:33時点における版のサムネイル 512 ×ばつ 512 (3キロバイト)Cmglee Convert CSS styles to attributes.
(最新 | 最古) (以後の10件 | ) (10 | 20 | 50 | 100 | 250 | 500 件) を表示

以下のページがこのファイルを使用しています:

グローバルなファイル使用状況

以下に挙げる他のウィキがこの画像を使っています:

メタデータ

このファイルには、追加情報があります (おそらく、作成やデジタル化する際に使用したデジタルカメラやスキャナーが追加したものです)。

このファイルが元の状態から変更されている場合、修正されたファイルを完全に反映していない項目がある場合があります。

短いタイトルSymmetrical 5-set Venn diagram
画像の説明Radially symmetrical five-set Venn diagram originally devised by Branko Gruenbaum and optimised for maximum area of the smallest regions and rendered by CMG Lee.
画像の幅100%
画像の高さ100%

AltStyle によって変換されたページ (->オリジナル) /