Programming Assignment #02 (Section 5)

In [1]:
import math
import matplotlib.pyplot as plt
#------------------------------------
def setup_T(min_t, max_t, dt):
    T = []; t = min_t
    while t <= max_t:             
        T.append(t)
        t += dt
    if t != max_t: T.append(max_t)
    return T
#------------------------------------
def plot(x, y, min_t, max_t, dt):
    T = setup_T(min_t, max_t, dt)
    X = [x(t) for t in T] 
    Y = [y(t) for t in T]
    plt.plot( X, Y, 'blue' )
#====================================

Prog-02: Beautiful Parametric Equation
6331315321 ธีรโชติ เดชสุวรรณกิจ
$x(t)=11cos(t)-6cos(\frac{11t}{6})$
$y(t)=11sin(t)-6sin(\frac{11t}{6})$
โปรแกรมนี้ออกมาสวยมากคับ
หาสมการเองเขียนเอง

In [2]:
def x(t):
    xt = 11*math.cos(t) - 6*math.cos(11*t/6)
    return xt
def y(t):
    yt = 11*math.sin(t) - 6*math.sin(11*t/6)
    return yt
plot(x, y, -20, 20, 0.1)
plt.show()

Prog-02: Beautiful Parametric Equation
6331339421 โมกข์ เลิศสุวรรณโรจน์
$x(t)=6cos(-11t/4)-6cos(t)^2$
$y(t)=6sin(-11t/4)-6sin(t)^2$
โปรแกรมนี้เรียบง่าย แต่สวยงาม
ผมเป็นผู้เลือกสมการข้างบนและเขียนนิพจน์คณิตศาสตร์ด้วยตัวเอง

In [3]:
def x(t):
 xt = 6*math.cos(-11/4*t)-6*math.cos(t)**2
 return xt
def y(t):
 yt = 6*math.sin(-11/4*t)-6*math.sin(t)**2
 return yt
plot(x, y, -16, 16, 0.01)
plt.show()

Prog-02: Beautiful Parametric Equation
6331346821 ศุภากร รัตนะคุปต์
$ x(t) = 5cos(3t) $
$ y(t) = 4sin(2t) $
โปรแกรมนี้วาดผมงานผมได้งานหยดย้อยมากๆๆๆๆ
ผมเป็นผู้เลือกสมการคณิตศาสตร์ที่สุดยอดนี้เพียงผู้เดียว

In [4]:
def x(t):
    xt = 5*math.cos(3*t)
    return xt

def y(t):
    yt = 4*math.sin(2*t)
    return yt

plot(x, y, 0, 2*math.pi, 0.01)
plt.show()

Prog-02: Beautiful Parametric Equation
6331348021 สิริธร พิพิธยากร
$x(t)=cos(t)-(cos(80t))^3 $y(t)=sin(80t)-(sin(80t))^4
โปรแกรมนี้วาดลวดลายกราฟได้สวยงามและชัดเจน
ดิฉันเป็นผู้เลือกสมการข้างบนและเขียนนิพจน์คณิตศาสตร์ด้วยตัวเอง

In [5]:
def x(t):
    xt = math.cos(t)-(math.cos(80*t))**3
    return xt

def y(t):
    yt = math.sin(80*t)-(math.sin(80*t))**4
 
    return yt

plot(x, y, -5, 5, 0.0001)
plt.show()

Prog-02: Beautiful ParametricEquation
6332003721 คุณานนต์ รัตนโกเศศ khunanon rattangoses
$x(t)=11cos(t)-6cos(11t/6)$
$y(t)=11sin(t)-6cos(11t/6)$
โปรแกรมนี้โครตสวยเลยครับ
ผมเป็นผู้เลือกสมการข้างบนและเขียนนิพจน์คณิตศาสตร์ด้วยตัวเองครับ

In [6]:
def x(t) :
    xt = 11*math.cos(t) - 6*math.cos(11*t/6)
    return xt

def y(t) :
    yt = 11*math.sin(t) - 6 * math.sin(11*t/6) 
    return yt

plot(x,y,0,1000, 0.1)
plt.show()

Prog-02: Beautiful Parametric Equation
6332014621 นาย ณัฐนภนต์ บำรุงศรี
$x(t)=cos((2/18)\pi t)+(cos((11/180)\pi t)/2)+(sin((2/18)\pi t)/3)$
$y(t)=sin((2/18)\pi t)+(sin((11/180)\pi t)/2)+(cos((2/18)\pi t)/3)$
โปรแกรมนี้วาดรูปคล้ายๆโดนัทสามมิติ
ผมเป็นผู้เลือกสมการข้างบนนี้และเขียนนิพจน์คณิตศาสตร์ด้วยตัวเอง ด้วยความที่สมการหายากเล็กน้อยผมไปเจอเว็ปนี้มา : http://www.sineofthetimes.org/the-art-of-parametric-equations-2/ เลยลองเลื่อนไปเรื่อยๆจนเจอรูปที่น่าสนใจครับ

In [7]:
def x(t):
    xt = math.cos(((2/18)*math.pi*t)) + math.cos(((11/180)*math.pi*t))/2 + math.sin(((2/18)*math.pi*t))/3
    return xt
def y(t):
    yt = math.sin(((2/18)*math.pi*t)) + math.sin(((11/180)*math.pi*t))/2 + math.cos(((2/18)*math.pi*t))/3
    return yt
plot(x, y, 0, 500, 1)
plt.show()

Prog-02: Beautiful Parametric Equation
6332028421 พงศ์วิวัฒน์ ลิมปสุธรรม
$x(t)=((1.67-1)\times cos(t))+(1\times cos(t\times ((1.67\div 1)-1)))$
$y(t)=((1.67-1)\times sin(t))-(1\times sin(t\times ((1.67\div 1)-1)))$
โปรแกรมนี้จะPlotกราฟออกมาเป็นรูปที่มีดาว วงกลม และห้าเหลี่ยมในรูปเดียวกัน
เลือกและเขียนนิพจน์คณิตศาสตร์ของสมการโดย พงศ์วิวัฒน์ ลิมปสุธรรม

In [8]:
def x(t):
    xt = ((1.67-1)*math.cos(t))+(1*math.cos(t*((1.67/1)-1)))
    return xt
def y(t):
    yt = ((1.67-1)*math.sin(t))-(1*math.sin(t*((1.67/1)-1)))
    return yt

plot(x, y, -250, 250, 0.01)
plt.show()