Skip to content

Instantly share code, notes, and snippets.

@mizar
Last active July 5, 2026 11:50
Show Gist options
  • Select an option

  • Save mizar/c7cd9fcec7aab96194d47f76bb7ba6ce to your computer and use it in GitHub Desktop.

Select an option

Save mizar/c7cd9fcec7aab96194d47f76bb7ba6ce to your computer and use it in GitHub Desktop.
5つの集合のベン図
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

5-set Venn diagram by 6 cubic Bézier segments

6本の3次ベジエ曲線による5集合ベン図

This gist contains an SVG of a 5-set Venn diagram candidate.

この gist には、5集合ベン図の候補となる SVG を置いています。

Each set boundary is drawn as a closed curve made from six cubic Bézier segments.

各集合の境界は、6本の3次ベジエ曲線からなる閉曲線として描かれています。

The five congruent curves are arranged with 5-fold rotational symmetry.

5つの合同な曲線を、5回回転対称になるように配置しています。

What is shown / 図の内容

  • The five sets are labeled A, B, C, D, E.
    • 5つの集合を A, B, C, D, E として表示しています。
  • Each atom region is labeled by the sets that contain it.
    • 各原子的領域には、その領域を含む集合名を表示しています。
  • For example, AB means inside A and B, but outside C, D, and E.
    • 例えば AB は、AB の内側で、C, D, E の外側にある領域を表します。
  • ABCDE is the central region inside all five sets.
    • ABCDE は、5つすべての集合の内側にある中央の領域です。
  • The dashed circle is the normalized outside reference circle.
    • 破線の円は、正規化された外側参照円です。
  • Small circles indicate estimated clearance / label-placement circles for the atom regions.
    • 小さな円は、各原子的領域に対する余白またはラベル配置用の目安円です。

Normalized parameters / 正規化パラメータ

The SVG uses normalized coordinates with the outside reference circle

この SVG では、外側参照円を次のように正規化した座標を用いています。

center = (0, 0)
radius = 1

The curve parameters embedded in the SVG description are:

SVG の説明として埋め込んでいる曲線パラメータは次の通りです。

outside_radius = 1.0
center_x = 0.0
center_y = 0.11311421301426505

p0_x = 0.9419745604576938
p1_x = 0.14764680147416648
p1_y = 0.4440164724916599
p2_x = -0.6147538767321648
p2_y = 0.6060660241815414
p3_x = -0.9383025165598259

h0_scale = 0.2054210935981375
h1_scale = 0.3252403789221257
h2_scale = 0.33916280048504444
h3_scale = 0.30438799064468863

phi1 = 2.8336389863039217
phi2 = 3.246767015313884

min clearance radius = 0.104652644592

Optimization policy / 曲線パラメータ最適化方針

The search treats the curve as a geometric candidate for a 5-set Venn diagram. The parameters are optimized under structural constraints first, and the clearance objective is evaluated only for candidates that pass those constraints.

この探索では、曲線を5集合ベン図の幾何的な候補として扱います。 まず構造的な制約を満たす候補だけを残し、その候補に対してラベル配置用の余白を評価します。

The required constraints are:

必要な制約は次の通りです。

  • The boundary of each set must be a closed curve.
    • 各集合の境界は閉曲線であること。
  • Adjacent cubic Bézier segments must meet with $C^1$ smoothness.
    • 隣接する3次 Bézier 曲線は $C^1$ 滑らかにつながること。
  • The base curve must be symmetric with respect to the x-axis.
    • 基本となる曲線は x 軸対称であること。
  • The curve must fit inside the outside reference circle of radius 1.
    • 曲線は半径1の外側参照円内に収まること。
  • The local shape should be convex, or at least should have no self-intersections.
    • 局所的に凸であること。少なくとも自己交差しないこと。
  • The five rotational copies must realize all 31 non-empty atom regions.
    • 5回転コピーによって、外側を除く全31個の原子的領域が非空になること。
  • Each atom region must be connected.
    • 各原子的領域が1連結であること。
  • Boundaries should not come so close to each other that connected atom regions become visually ambiguous.
    • 原子的領域が1連結であることを視覚的に確認できる程度に、境界線同士の接近を制限すること。

Among candidates that satisfy these constraints, the parameters are adjusted to make the minimum label-clearance circle radius over all atom regions as large as possible in the search. The current parameters are not claimed to be globally optimal for this objective.

これらの制約を満たす候補の中で、全原子的領域に対するラベル余白円半径の最小値がなるべく大きくなるように調整しています。 ただし、現状のパラメータがこの目的に対して大域的に最適であることは保証していません。

License / ライセンス

CC0-1.0

Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment