קובץ:Sine quads 01 Pengo.svg

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

לקובץ המקורי(קובץ SVG, הגודל המקורי: 1,065 × 459 פיקסלים, גודל הקובץ: 59 ק"ב)

זהו קובץ שמקורו במיזם ויקישיתוף וניתן להשתמש בו גם במיזמים אחרים.
פרטי הקובץ שמופיעים למטה נלקחו מדף תיאור הקובץ המקורי.
תיאור Quadrants for sin(x)
תאריך יצירה
מקור נוצר על־ידי מעלה היצירה
יוצר Pengo
SVGהתפתחות 
InfoField
 
.קוד המקור של קובץ SVG זה הוא תקין
 
Matplotlib עם‎‎ נוצרה ה גרפיקה וקטורית
קוד מקור
InfoField

Python code

import numpy as np
import matplotlib.pyplot as plt
from math import pi
import math

# HACKISH WARNING: this version internally uses 0 to 2 for the sine wave x axis, but labels it 0 to 2pi
# This is so the two graphs can be the same size. I couldn't work out how to otherwise within pyplot.
# (Actually only wanted the height of the two graphs to be the same, and was originally aiming to have the second x axis with the same scale as the first, which would have made it 3.14x longer.)

def addLines(quad, color):
	incr = 1.0/1000.0
	start = quad/2.0
	end = start + 0.5 + incr
	x = np.arange(start, end, incr)
	lines = plt.plot(x, np.sin(pi*x), '')
	plt.setp(lines, color=color, linewidth=2.5, solid_capstyle='butt', solid_joinstyle='miter')


def addPolar(quad, color):
	incr = pi/1000.0
	start = quad*pi/2.0
	end = start + pi/2.0 + incr
	x = np.arange(start, end, incr)
	lines = plt.plot(np.cos(x), np.sin(x), '')
	plt.setp(lines, color=color, linewidth=2.0, solid_capstyle='butt', solid_joinstyle='miter')
		
def addTicks():
	start = 0 # in pi
	end = 3 # in pi
	tickPoints = []
	tickNames = []
	done = [] # in units of pi
	#denoms = [1, 2, 4, 8] # show more
	denoms = [1, 2]
	for denom in denoms:
		for numer in range(denom * start, denom * end):
			val = (numer+0.0)/(denom+0.0)
			if val not in done:
				#tickPoints.append(val * pi) # this is preferred
				tickPoints.append(val) # dodgy hack to help make the graph square. 
				done.append(val)
				
				pich = u'\u03C0'
				strTop = str(numer) + pich
				if numer == 0:
					strTop = "0"
				elif numer == 1:
					strTop = pich
				

				if denom == 1:
					tickNames.append(strTop)
				else:
					tickNames.append(strTop + "/" + str(denom))
	
	plt.xticks(tickPoints, tickNames)	

	
def drawSine():
	addLines(-1, 'yellow')
	addLines(0, 'brown')
	addLines(1, 'r')
	addLines(2, 'orange')
	addLines(3, 'yellow')
	addLines(4, 'brown')

	addTicks()
	slack = .1
	plt.axis('scaled')
	plt.xlim(-slack, 2.0 + slack)
	plt.ylim(-1.1, 1.1)
	plt.grid(True)
	
	plt.xlabel('$x$')
	plt.ylabel('$y$')
	plt.title(r'$y = \sin x$')

	plt.text( .25,  0, 'I', family='serif', fontsize=26, ha='center', va='center')
	plt.text(.75,  0, 'II', family='serif', fontsize=26, ha='center', va='center')
	plt.text(1.25, 0, 'III', family='serif', fontsize=26, ha='center', va='center')
	plt.text( 1.75, 0, 'IV', family='serif', fontsize=26, ha='center', va='center')

def drawUnitCircle():
	addPolar(0, 'brown')
	addPolar(1, 'r')
	addPolar(2, 'orange')
	addPolar(3, 'yellow')

	edge = 1.1
	plt.axis('scaled')
	plt.axis([-edge, edge, -edge, edge])
	plt.grid(True)

	plt.xlabel('$x$')
	plt.ylabel('$y$')
	plt.title(r'$x^2 + y^2 = 1$')
	
	lo = .85 #label offset
	plt.text( lo,  lo, 'I', family='serif', fontsize=26, ha='center', va='center')
	plt.text(-lo,  lo, 'II', family='serif', fontsize=26, ha='center', va='center')
	plt.text(-lo, -lo, 'III', family='serif', fontsize=26, ha='center', va='center')
	plt.text( lo, -lo, 'IV', family='serif', fontsize=26, ha='center', va='center')

def twoInOne():	
	plt.subplot(121)
	drawUnitCircle()
	plt.subplot(122)
	drawSine()

twoInOne()
plt.savefig("Sine_quads_01_Pengo.svg")

plt.show()

רישיון

Image credit: Peter Halasz. (User:Pengo)

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

When employing the Creative Commons license, give attribution to:

Although not a requirement of the license, if you use this image in print or media other than the web, I would appreciate it if you let me know. Please contact me if you require alternate licensing.

כיתובים

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

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

מוצג

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

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

תאריך/שעהתמונה ממוזערתממדיםמשתמשהערה
נוכחית04:55, 21 בספטמבר 2010תמונה ממוזערת לגרסה מ־04:55, 21 בספטמבר 2010‪459 × 1,065‬ (59 ק"ב)Pengoadd quadrant labels
04:17, 21 בספטמבר 2010תמונה ממוזערת לגרסה מ־04:17, 21 בספטמבר 2010‪441 × 963‬ (56 ק"ב)PengoAdded axis labels and titles
06:16, 20 בספטמבר 2010תמונה ממוזערת לגרסה מ־06:16, 20 בספטמבר 2010‪366 × 905‬ (42 ק"ב)Pengo{{Information |Description=Quadrants for sin(x) |Source={{own}} |Date=2010-09-20 |Author= Pengo |Permission=see below |other_versions= }} Category:Sine function

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

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