پرونده:Beta-skeleton.svg

از testwiki
پرش به ناوبری پرش به جستجو
پروندهٔ اصلی (پروندهٔ اس‌وی‌جی، با ابعاد ۴۵۰ × ۴۵۰ پیکسل، اندازهٔ پرونده: ۷۸ کیلوبایت)

این پرونده از ویکی‌انبار است و ممکن است توسط پروژه‌های دیگر هم استفاده شده باشد. توضیحات موجود در صفحهٔ توضیحات پرونده در آنجا، در زیر نشان داده شده است.

خلاصه

توضیح
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
SVG genesis
InfoField
 کد مبدأ این اس‌وی‌جی معتبر است.
 این نمودار با Adobe Illustrator ساخته شده است.

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 این اثر توسط پدیدآور آن، David Eppstein، به مالکیت عمومی درآمده است. این مربوط به تمام جهان است.
در برخی از کشورها ممکن است به صورت قانونی این امکان‌پذیر نباشد؛ اگر چنین است:
David Eppstein به هر کسی اجازهٔ استفاده از این اثر برای هر مقصودی، بدون هیچ‌گونه شرایطی، را می‌دهد تا وقتی که این شرایط توسط قانون مستلزم نشده باشند.

عنوان

شرحی یک‌خطی از محتوای این فایل اضافه کنید

آیتم‌هایی که در این پرونده نمایش داده شده‌اند

توصیف‌ها

source of file انگلیسی

checksum انگلیسی

46602904f32f387c12a018868fce3fc20309533e

۷۹٬۴۱۴ بایت

۴۵۰ پیکسل

۴۵۰ پیکسل

تاریخچهٔ پرونده

روی تاریخ/زمان‌ها کلیک کنید تا نسخهٔ مربوط به آن هنگام را ببینید.

تاریخ/زمانبندانگشتیابعادکاربرتوضیح
کنونی۲۰ فوریهٔ ۲۰۱۰، ساعت ۰۴:۵۸تصویر بندانگشتی از نسخهٔ مورخ ۲۰ فوریهٔ ۲۰۱۰، ساعت ۰۴:۵۸۴۵۰ در ۴۵۰ (۷۸ کیلوبایت)wikimediacommons>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 β =&

صفحهٔ زیر از این تصویر استفاده می‌کند: