לדלג לתוכן

קובץ:Catenary properties.svg

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

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

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

תקציר

תיאור diagram of a catenary showing some properties
מקור נוצר על־ידי מעלה היצירה
יוצר Vernanimalcula
SVGהתפתחות 
InfoField
 
.קוד המקור של קובץ SVG זה הוא תקין
 
This vector image was created with a text editor.

רישיון

אני, בעל זכויות היוצרים על היצירה הזאת, מפרסם אותה בזאת תחת הרישיונות הבאים:
GNU head מוענקת בכך הרשות להעתיק, להפיץ או לשנות את המסמך הזה, לפי תנאי הרישיון לשימוש חופשי במסמכים של גנו, גרסה 1.2 או כל גרסה מאוחרת יותר שתפורסם על־ידי המוסד לתוכנה חופשית; ללא פרקים קבועים, ללא טקסט עטיפה קדמית וללא טקסט עטיפה אחורית. עותק של הרישיון כלול בפרק שכותרתו הרישיון לשימוש חופשי במסמכים של גנו.
w:he:Creative Commons
ייחוס שיתוף זהה
הנכם רשאים:
  • לשתף – להעתיק, להפיץ ולהעביר את העבודה
  • לערבב בין עבודות – להתאים את העבודה
תחת התנאים הבאים:
  • ייחוס – יש לתת ייחוס הולם, לתת קישור לרישיון, ולציין אם נעשו שינויים. אפשר לעשות את זה בכל צורה סבירה, אבל לא בשום צורה שמשתמע ממנה שמעניק הרישיון תומך בך או בשימוש שלך.
  • שיתוף זהה – אם תיצרו רמיקס, תשנו, או תבנו על החומר, חובה עליכם להפיץ את התרומות שלך לפי תנאי רישיון זהה או תואם למקור.
הנכם מוזמנים לבחור את הרישיון הרצוי בעיניכם.

Source program

The image is the output of this Python program:

from math import cosh, sinh

# Catenary
w = 400.0
a = 100.0
b = a*cosh((w/2)/a)
l = a*sinh((w/2)/a)
h = b-a

W, H = w+120, h+120 # total size of SVG image
ox, oy = 40.0, 40.0 # offset of diagram in SVG image (in SVG coords)

def x2svg( x ):
   """ Converts mathematial x to SVG coordinate """
   return ox + w/2 + x

def y2svg( y ):
   """ Converts mathematial y to SVG coordinate """
   return oy - y

def tosvg( t ):
   """ Converts t=(x,y,x,y,...) (mathematical) to SVG coordinates """
   coords = ()
   for i in range(0,len(t),2):
      coords = coords + (x2svg(t[i]),y2svg(t[i+1]))
   return coords

def print_polyline( t ):
   """ SVG polyline given by mathematical coordinates """
   ilist = ' '.join( ['%i'] * len(t) )
   s = '<polyline points="%s" style="stroke:#00A;stroke-width:3;fill:none;"/>' % ilist
   print s % tosvg(t)

fontsize=36
def print_text( x, y, txt, color='#00A' ):
   """ Print text centered at mathematical coordinates """
   svgx = x2svg(x) - 0.25*len(txt)*fontsize
   svgy = y2svg(y) + 0.25*fontsize
   print '<text x="%i" y="%i" style="font-family:sans-serif;font-size:%i;font-style:italic;color:%s">%s</text>' % (svgx,svgy,fontsize,color,txt)

def print_arrow( x0, y0, x1, y1, x2, y2, x3, y3 ):
   """ Print arrow with lines given by mathematical coordinates """
   print_polyline((x0,y0,x1,y1))
   print_polyline((x2,y2,x0,y0,x3,y3))

def print_xarrow( x0, y0, l, d ):
   """ Print horicontal arrow; l = long line; d = short line """
   print_arrow( x0, y0, x0+l, y0, x0+d, y0+d, x0+d, y0-d )

def print_yarrow( x0, y0, l, d ):
   """ Print vertical arrow; l = long line; d = short line """
   print_arrow( x0, y0, x0, y0+l, x0+d, y0+d, x0-d, y0+d )

########################################################################

print """<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
 "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg"
     width="%i"
     height="%i"
     viewBox="%i %i %i %i">""" % (W,H,0,0,W,H)

# Background
print '<rect id="background" x="0" y="0" width="%i" height="%i" style="fill:#FFF"/>' % (W,H)
print '<rect id="curve" x="%i" y="%i" width="%i" height="%i" style="fill:#DDF"/>' % (ox,oy,w,h)

# Circle of radius a
print '<circle cx="%i" cy="%i" r="%i" style="stroke:#00A;stroke-width:3;fill:none;"/>' % (x2svg(0),y2svg(a-h),a)
print_polyline(( 0, a-h, a, a-h))
print_text( 0.5*a, 1.14*a-h, 'a' )

# Catenary
n = 100
xvals = [ w*(float(i)/n) for i in range(-n/2,n/2+1) ]
p = ' '.join([ '%i %i' % tosvg((x,a*cosh(x/a)-b)) for x in xvals ])
s = 'stroke:#000; stroke-width:5; fill:none'
print '<polyline points="%s" style="%s"/>' % (p,s)
print_text( -0.4*w, -0.1*h, 'l', color='#000' )

# Arrows
y0, l, d = 20, 0.44*w, 0.025*w
print_text( 0, y0, 'w' )
print_xarrow( -w/2, y0,  l,  d )
print_xarrow(  w/2, y0, -l, -d )
x0, l = -0.55*w, 0.42*h
print_text( x0, -h/2, 'h' )
print_yarrow(  x0,  0, -l, -d )
print_yarrow(  x0, -h,  l,  d )

# Labels
print_text( 0, -1.25*h, 'b=h+a' )
fontsize=18
y = -1.1*h
print_text( -w/2, y, 'x=-w/2' )
print_text(    0, y, 'x=0' )
print_text(  w/2, y, 'x=w/2' )
x = 0.6 * w
print_text( x, 0,  'y=0' )
print_text( x, -h, 'y=-h' )

print "</svg>"

כיתובים

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

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

מוצג

image/svg+xml

checksum אנגלית

6f4b9a91c75d9ae2a7428366d2ad348f01d04a7e

הוגדר לפי: SHA-1 אנגלית

396 פיקסל

520 פיקסל

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

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

תאריך/שעהתמונה ממוזערתממדיםמשתמשהערה
נוכחית00:04, 20 בינואר 2008תמונה ממוזערת לגרסה מ־00:04, 20 בינואר 2008‪396 × 520‬ (3 ק"ב)Vernanimalcula{{Information |Description=diagram of a catenary showing some properties |Source=self-made |Date= |Author= Vernanimalcula |Permission= |other_versions= }}

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

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

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