לדלג לתוכן

קובץ:Beta-skeleton.svg

תוכן הדף אינו נתמך בשפות אחרות.
מתוך ויקיפדיה, האנציקלופדיה החופשית

לקובץ המקורי(קובץ SVG, הגודל המקורי: 450 × 450 פיקסלים, גודל הקובץ: 78 ק"ב)

ויקישיתוף זהו קובץ שמקורו במיזם ויקישיתוף. תיאורו בדף תיאור הקובץ המקורי (בעברית) מוצג למטה.

תקציר

תיאור
English: Two β-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.
תאריך יצירה
מקור נוצר על־ידי מעלה היצירה
יוצר David Eppstein

Source code

This image was created with the following Python source code and then recolored and converted to SVG in Adobe Illustrator.

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((p[i]-r[i])*(q[i]-r[i]) 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(p[0],p[1],q[0],q[1]),
             [color.rgb.black])

def edge2(p,q):
    c.stroke(path.line(p[0],p[1],q[0],q[1]),
             [color.rgb.blue])

def point(p):
    c.fill(path.circle(p[0],p[1],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")

רישיון

Public domain ברצוני, בעלי זכויות היוצרים על יצירה זו, לשחרר יצירה זו לנחלת הכלל. זה תקף בכל העולם.
יש מדינות שבהן הדבר אינו אפשרי על פי חוק, אם כך:
אני מעניק לכל אחד את הזכות להשתמש בעבודה זו לכל מטרה שהיא, ללא תנאים כלשהם, אלא אם כן תנאים כאלה נדרשים על פי חוק.

כיתובים

נא להוסיף משפט שמסביר מה הקובץ מייצג

פריטים שמוצגים בקובץ הזה

מוצג

image/svg+xml

checksum אנגלית

46602904f32f387c12a018868fce3fc20309533e

79,414 בית

450 פיקסל

450 פיקסל

היסטוריית הקובץ

ניתן ללחוץ על תאריך/שעה כדי לראות את הקובץ כפי שנראה באותו זמן.

תאריך/שעהתמונה ממוזערתממדיםמשתמשהערה
נוכחית06:58, 20 בפברואר 2010תמונה ממוזערת לגרסה מ־06:58, 20 בפברואר 2010‪450 × 450‬ (78 ק"ב)David Eppstein{{Information |Description={{en|1=Two β-skeletons of a set of 100 random points in a square. The heavy black edges are the β-skeleton for β = 1.1, while the light dashed blue edges are the additional edges for β =&

אין בוויקיפדיה דפים המשתמשים בקובץ זה.

שימוש גלובלי בקובץ

אתרי הוויקי השונים הבאים משתמשים בקובץ זה: