ไฟล์:Torus cycles.svg

ไม่รองรับเนื้อหาของหน้าในภาษาอื่น
จากวิกิพีเดีย สารานุกรมเสรี

ดูภาพที่มีความละเอียดสูงกว่า((ไฟล์ SVG, 512 × 780 พิกเซล, ขนาดไฟล์: 46 กิโลไบต์))

Wikimedia Commons logo รูปภาพหรือไฟล์เสียงนี้ ต้นฉบับอยู่ที่ คอมมอนส์ รายละเอียดด้านล่าง เป็นข้อความที่แสดงผลจาก ไฟล์ต้นฉบับในคอมมอนส์
คอมมอนส์เป็นเว็บไซต์ในโครงการสำหรับเก็บรวบรวมสื่อเสรี ที่ คุณสามารถช่วยได้

ความย่อ

คำอธิบาย
English: Homology cycles on a torus. Radius of magenta circle is and radius of red circle is . Image created in python and subsequently cropped and rotated manually using a text editor.
วันที่
แหล่งที่มา งานของตัว
ผู้สร้างสรรค์ Krishnavedala
เวอร์ชันอื่น
SVG genesis
InfoField
 
ซอร์สโค้ดของ SVG นี้ตรวจสอบถูกต้องแล้ว
 
ไฟล์ภาพกราฟิกส์เวกเตอร์นี้ สร้างขึ้นโดยใช้ Matplotlib
รหัสต้นฉบับ
InfoField

Python code

Source code
from mpl_toolkits.mplot3d import axes3d
from matplotlib.patches import Circle
import matplotlib.pyplot as plt
import mpl_toolkits.mplot3d.art3d as art3d
import numpy as np

R, r = 15, 5

def get_x(phi, theta):
    global r, R
    return (R + r * np.cos(phi)) * np.cos(theta)

def get_y(phi, theta):
    global r, R
    return (R + r * np.cos(phi)) * np.sin(theta)

def get_z(phi, theta):
    global r
    return r * np.sin(phi)

if __name__ == "__main__":
    fig = plt.figure(figsize=(10,10))
    ax = fig.add_subplot(111, projection='3d')

    ph = th = np.linspace (-np.pi, np.pi,30)
    phi, theta = np.meshgrid (ph, th)

    x = np.array([get_x(p,t) for p,t in zip(np.ravel(phi), np.ravel(theta))])
    X = x.reshape(phi.shape)
    y = np.array([get_y(p,t) for p,t in zip(np.ravel(phi), np.ravel(theta))])
    Y = y.reshape(phi.shape)
    z = np.array([get_z(p,t) for p,t in zip(np.ravel(phi), np.ravel(theta))])
    Z = z.reshape(phi.shape)
    C1 = Circle( (R,0), radius=r, fc='none', ec='red')
    C2 = Circle( (0,0), radius=R, fc='none', ec='magenta')

    ax.plot_wireframe(X, Y, Z, color='#CCCCCC')
    ax.add_patch(C1)
    ax.add_patch(C2)
    art3d.pathpatch_2d_to_3d(C1, z=0, zdir='y')
    art3d.pathpatch_2d_to_3d(C2, z=r, zdir='z')

    ax.set_xlim3d(-20,20)
    ax.set_ylim3d(-20,20)
    ax.set_zlim3d(-20,20)
    ax.set_xlabel('X')
    ax.set_ylabel('Y')
    ax.set_zlabel('Z')
    ax.set_axis_off()

    ax.view_init(elev=30, azim=-45)
    plt.show()
    plt.savefig('torus.svg', bbox_inches='tight', pad_inches=.15, \
        bbox_extra_artists=[C1,C2], transparent='true')

การอนุญาตใช้สิทธิ

ข้าพเจ้า ในฐานะผู้ถือลิขสิทธิ์ของภาพหรือสื่อนี้ อนุญาตให้ใช้ภาพหรือสื่อนี้ภายใต้เงื่อนไขต่อไปนี้
Creative Commons CC-Zero ไฟล์นี้มีให้ใช้ภายใต้ CC0 1.0 Universal Public Domain Dedication ของครีเอทีฟคอมมอนส์
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

คำบรรยายโดยย่อ

เพิ่มคำบรรยายทรรทัดเดียวเพื่อขยายความว่าไฟล์นี้มีอะไร

ไอเทมที่แสดงอยู่ในไฟล์นี้

ประกอบด้วย

ประวัติไฟล์

คลิกวันที่/เวลาเพื่อดูไฟล์ที่ปรากฏในขณะนั้น

วันที่/เวลารูปย่อขนาดผู้ใช้ความเห็น
ปัจจุบัน23:38, 14 เมษายน 2557รูปย่อสำหรับรุ่นเมื่อ 23:38, 14 เมษายน 2557512 × 780 (46 กิโลไบต์)Krishnavedala

หน้าต่อไปนี้ โยงมาที่ภาพนี้:

การใช้ไฟล์ข้ามโครงการ

วิกิอื่นต่อไปนี้ใช้ไฟล์นี้:

ข้อมูลเกี่ยวกับภาพ