KNOWLEDGE LIBRARY

How does Weighted Voronoi Stippling recreate images? Complete 2026 Guide Explained

⏱️29分の動画5分で読める

📘この記事で学べること

「 」 、 。 、 、 。

manabi AI標準
2026/5/3 作成 2026/6/1 更新
Coding Challenge 181: Weighted Voronoi Stippling
動画を再生

The Coding TrainCoding Challenge 181: Weighted Voronoi Stippling📅 2024年2月22日 公開

この動画の内容を、要点・図解・学習ポイントとして 分かりやすく AI が要約しています。

⚠️

AI が要約しているため、 内容は必ずしも正確とは限りません。 重要な内容は元動画などでご確認ください。

🎯

こんな人におすすめ

  • p5.js D3.js

この動画から学べる学習ポイント

  • 1
  • 2
  • 3
  • 4
  • 5

ここからが本番

詳細な解説記事 - ここを読むと
一気に理解度が深まります

Foundations of Computational Geometry: Delaunay and Voronoi

How does Weighted Voronoi Stippling recreate images? Complete 2026 Guide Explained - 導入 イラスト

To understand weighted stippling, one must first grasp the relationship between Delaunay triangulation and Voronoi diagrams. At their core, both concepts rely on a set of seed points. A Delaunay triangulation creates a mesh of triangles where no seed point lies inside the circumcircle of any triangle in the network. This property ensures that the triangles are as 'fat' as possible, avoiding long, thin slivers. For developers using JavaScript, leveraging the d3-delaunay package is a highly efficient way to compute these structures without reinventing complex geometric algorithms from scratch.

A Voronoi diagram is the dual of the Delaunay triangulation. It partitions a two-dimensional plane into polygons, or 'cells,' where every point inside a specific cell is closer to its seed point than to any other. This is not merely a mathematical curiosity; it is a fundamental way to describe spatial distribution. In our coding context, we use D3.js to handle the heavy lifting of these calculations, passing an array of coordinates into a Delaunay object and then generating the Voronoi partition from it.

💡Key insight: The centers of the circumcircles of Delaunay triangles are exactly the vertices that define the Voronoi polygons.

While p5.js is excellent for rendering, D3.js provides the robust data structures needed for fast geometric lookups. Mixing these libraries allows us to maintain a high frame rate while performing complex spatial analysis on thousands of points simultaneously. When initializing your points, remember to format them as a single flat array of [x, y, x, y...] for compatibility with D3's expectations.

ConceptPrimary CharacteristicVisual Result
Delaunay TriangulationEmpty circumcircle propertyConnected mesh of triangles
Voronoi DiagramProximity-based partitioningMosaic of unique polygons

The Art of Relaxation: Implementing Lloyd's Algorithm

How does Weighted Voronoi Stippling recreate images? Complete 2026 Guide Explained - 本論 イラスト

Randomly distributed points often look cluttered or 'noisy.' To achieve a more organized and professional aesthetic, we apply Lloyd's algorithm, also known as Voronoi relaxation. This process involves finding the centroid (the center of mass) of each Voronoi polygon and moving the seed point toward that center. By repeating this process over multiple frames, the points 'relax' into a balanced, organic distribution similar to patterns found in nature, such as the arrangement of cells in a leaf.

Calculating the centroid of a polygon requires more than just averaging the vertices. For a true geometric center, you must calculate the area and use the cross product of the vertices. This math ensures that the point moves to the precise balance point of the polygon's shape. Without this accuracy, the points might collapse into clusters or 'black holes' rather than spreading out evenly across the canvas.

🔥ここから本番

ここからが大事な
ポイントです

具体例・注意点・明日から使えるヒントを整理しています。

無料閲覧で全文 + 図解の完全版を3日間いつでも読み返せる

あなたの好きな動画も、
1分でAI要約

📚 お気に入り保存 + ✨ あなたの動画をAI要約
(無料登録10秒)

✏️ この記事で学べること

  • 「 」 、 。 、 、 。

10秒で完了・パスワード作成不要

この続きは…

残り 4,265/7,797 文字(残り 55%)

あと 2 章 + 編集視点 + FAQ

manabi AI

動画の内容を基にAIが自動生成しました

YouTube要約 1,000ノートが
いつでも無料で学習し放題

YouTube の知恵を 5 分で学べるメディア

10秒で完了