MAKE A MEME View Large Image Beta-skeleton.svg β-skeletons of a set of 100 random points in a square The heavy dark edges are the β-skeleton for β   1 1 while the light dashed blue edges are the additional edges for β   0 9 own David Eppstein 2010-02-19 Source code ...
View Original:Beta-skeleton.svg (450x450)
Download: Original    Medium    Small Thumb
Courtesy of:commons.wikimedia.org More Like This
Keywords: Beta-skeleton.svg β-skeletons of a set of 100 random points in a square The heavy dark edges are the β-skeleton for β   1 1 while the light dashed blue edges are the additional edges for β   0 9 own David Eppstein 2010-02-19 Source code This image was created with the following Python source code and then recolored and converted to SVG in Adobe Illustrator <source lang python > from pyx import canvas path color from math import from random import seed random seed 12345 npoints 100 radius 0 05 scale 5 beta1 1 1 beta2 0 9 theta1 asin 1/beta1 theta2 pi - asin beta2 points random scale random scale for i in range npoints def dot p q r return sum pi-ri qi-ri for i in 0 1 def sharp p q theta None for r in points if r not in p q prq acos dot p q r / dot p p r dot q q r 0 5 theta max theta prq return theta c canvas canvas def edge1 p q c stroke path line p0 p1 q0 q1 color rgb black def edge2 p q c stroke path line p0 p1 q0 q1 color rgb blue def point p c fill path circle p0 p1 radius color rgb red for p in points for q in points if p < q theta sharp p q if theta < theta1 edge1 p q elif theta < theta2 edge2 p q for p in points point p c writePDFfile Beta-skeleton </source> Computational geometry Files by User David Eppstein from en wikipedia Images with Python source code
Terms of Use   Search of the Day