Programming Assignment #02 (Section 2)

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' )
#====================================

-- coding: utf-8 --
Prog-02: Beautiful Parametric Equation
?????????? นาย???? ????
$x(t)=cos(70t)-cos^3(70t)$
$y(t)=sin(70t)-sin^3(70t)$
โปรแกรมนี้มีลวดลายสมมาตรและน่าค้นหา
ผมเป็นผู้เลือกสมการข้างบนและเขียนนิพจน์คณิตศาสตร์ด้วยตัวเอง

In [2]:
def x(t):
 xt = math.cos(70*t) - (math.cos(t))**3
 return xt
def y(t):
 yt = math.sin(t) - (math.sin(70*t))**3
 return yt
plot(x, y,-math.pi,math.pi, 0.001)
plt.show()

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

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

Prog-02: Parametric Equations
?????????? ???? ????
$x(t)= cos(1t)-cos^3(200t)$
$y(t)= sin(200t)-sin^4(2t)$
โปรแกรมนี้วาดลวยลายได้สวยงาม สร้างสรรค์โดยใช้รูปสามเหลี่ยมเป็นแรงบันดาลใจ
ดิฉันขอยืนยันว่าเป็นผู้เลือกและเขียนนิพจน์คณิตศาสตร์ของสมการที่เลือกด้วยตนเอง

In [4]:
def x(t):
    xt = math.cos(t*1)-math.cos(t*200)**3
    return xt
def y(t):
    yt = math.sin(200*t)-math.sin(t*2)**4
    return yt
plot(x, y, -19, 19, 0.1*math.e)
plt.show()

Prog-02: Beautiful Parametric Equation
?????????? ???? ????
$x(t)=4cos(-11t/4)+7cos(t)$
$y(t)=4sin(-11t/4)+7sin(t)$
โปรแกรมนี้สามารถวาดภาพได้หลากหลายรูปแบบ
หนูเป็นผู้เลือกสมการด้านบนแลเขียนนิพจน์คณิตศาสตร์ด้วยตัวเอง

In [5]:
def x(t) :
    xt = 4*math.cos(-11*t/4) + 7*math.cos(t)
    return xt
def y(t) :
    yt = 4*math.sin(-11*t/4) + 7*math.sin(t)
    return yt

plot(x, y, 0, 8*math.pi, 0.001)
plt.show()

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

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

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

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

Prog-02: Beautiful Parametric Equation
?????????? นาย???? ????
$x(t)=cos(t)-cos(100t)sin(t)$
$y(t)=2sin(t)-sin(100t)$
โปรแกรมนี้สามารถพล็อตกราฟได้ตามความต้องการของเรา ซึ่งนับเป็นความสุขและความสวยงามอย่างยิ่ง
ผมเป็นผู้ที่ไปหาสมการนี้จากในอินเทอร์เน็ตด้วยตนเอง และนำนิพจน์คณิตศาสตร์มาเขียนด้วยตนเอง

In [7]:
def x(t): 
    xt = math.cos(t)-math.cos(100*t)*math.sin(t)
    return xt

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

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

Prog-02 : Beautiful Parametric Equation
?????????? นางสาว ???? ????
$x(t) = (10cos(3.5362t))sin(t)$
$y(t) = (10cos(3.5362t))$
โปรแกรมนี้วาดได้สวยงามมาก
หนูเป็นผู้เลือกสมการข้างบนและเขียนนิพจน์คณิตศาสตร์ด้วยตัวเอง

In [8]:
def x(t):
    xt = (10*math.cos(3.5362*t))*math.sin(t)
    return xt
def y(t):
    yt = (10*math.cos(3.5362*t))
    return yt
plot(x, y, 32, 94.8, 0.03)
plt.show()

Prog-02: Beautiful Parametric Equation
?????????? ???? ????
$x(t) = 2t + 2cos(22.5t) + \frac{2}{t}$
$y(t) = 2t + 2sin(24t) + \frac{2}{t}$
โปรแกรมนี้ใช้งานง่ายทำให้สามารถแสดงกราฟที่สวยงามเช่นนี้ออกมาได้
นิสิตขอยืนยันว่า นิสิตเป็นผู้เลือกสมการและเป็นผู้เขียนนิพจน์ของสมการที่นิสิตได้เลือกไว้

In [9]:
def x(t):
    xt = 2*t + 2*math.cos(22.5*t) + 2/t
    return xt
def y(t):
    yt = 2*t + 2*math.sin(24*t) + 2/t
    return yt
plot(x, y, 0.5, 15.2, 0.00001)
plt.show()

Prog-02: Beautiful Parametric Equation
?????????? นาย ???? ????
$ x(t) = sin(t)(e^{cos(t)}-2cos(4t)-sin(\frac{t}{12})^{5}) $
$ y(t) = cos(t)(e^{cos(t)}-2cos(4t)-sin(\frac{t}{12})^{5}) $
ปีกผีเสื้อของผมโค้งงอสวยงามมาก เพราะผมกำหนดค่า dt ไว้ที่ 0.00001
ผมเป็นผู้เลือกมการข้างบนและเขียนนิพจน์คณิตศำสตร์ด้วยตัวเอง

In [10]:
def x(t):
    xt = math.sin(t)*((math.e**math.cos(t))-(2*math.cos(4*t))-(math.sin(t/12)**5))
    return xt
def y(t):
    yt = math.cos(t)*((math.e**math.cos(t))-(2*math.cos(4*t))-(math.sin(t/12)**5))
    return yt
plot(x, y, 0, 10*math.pi, 0.00001)
plt.show()

Prog-02: Beautiful Parametric Equation
?????????? ???? ????
$x(t)=sin(7t)$
$y(t)=sin(8t)$
โปรแกรมนี้วาดลวดลายแปลกตาและรู้สึกสงสัยฉงนใจ
ดิฉันเป็นผู้เลือกสมกำรข้ำงบนและเขียนนิพจน์คณิตศำสตร์ด้วยตัวเอง

In [11]:
def x(t):
    xt = math.sin(7*t)
    return xt

def y(t):
  yt = math.sin(8*t)
  return yt
plot(x, y, 0, 2*math.pi, 0.1)
plt.show()

Prog-02: Beautiful Parametric Equation
?????????? นาย???? ????
$x(t)=t-1.6cos(24t)$
$y(t)=t-1.6sin(25t)$
โปรแกรมนี้วาดโดยแต่ละเกลียวทะลวงและเบียดเสียดกับเกลียวอื่นรอบข้างพร้อมๆกัน
ผมเป็นผู้เลือกสมการข้างบนและเขียนนิพจน์คณิตศำสตร์ด้วยตัวเอง
คุณสามารถสำรวจสมการอื่นๆหรือการปรับเปลี่ยนสีของผมเพิ่มเติมได้ที่นี่ https://www.kaggle.com/neospirit/prog-02-beautiful-parametric-equation

In [12]:
def x(t):
    xt = t -1.6*math.cos(24*t)
    return xt
def y(t):
    yt = t -1.6*math.sin(25*t)
    return yt

plot(x, y, -11, 8, 0.01)
plt.show()

Prog-02: Beautiful Parametric Equation
?????????? ???? ????
$x(t)=(2t)+(2cos(14t))+\frac{1}{t}$
$y(t)=(2t)+(2sin(15t))+\frac{1}{t}$
โปรแกรมนี้แสดงรูปร่างได้สวยงามตรงใจผมเป็นอย่างมาก
ข้าพเจ้าเป็นผู้ค้นหา,เลือก และเขียนนิพจน์นี้ด้วยตนเอง

In [13]:
def x(t):
    xt = (2*t)+(2*math.cos(14*t))+(1/t)
    return xt

def y(t):
    yt = (2*t)+(2*math.sin(15*t))+(1/t)
    return yt

plot(x, y, 1, 14, 0.01)
plt.show()

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

In [14]:
def x(t):
    xt = math.sin(t)*((math.e**math.cos(t))- \
        2*math.cos(4*t)-(math.sin(t/12)**5))
    return xt
def y(t):
    yt = math.cos(t)*((math.e**math.cos(t))- \
        2*math.cos(4*t)-(math.sin(t /12)**5))
    return yt
plot(x, y, 0, 12*math.pi, 0.01)
plt.show()

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

In [15]:
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
?????????? ???? ????
$ x(t) = cos(t)-cos(t)^3 $
$ y(t) = sin(t)-sin(t)^3 $
แสดงภาพได้สวยงาม
นิสิตเป็นผู้เลือกและเขียนนิพจน์คณิตศาสตร์ของสมการที่เลือก

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

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

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

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

In [17]:
def x(t):
    xt = math.cos(16*t) + math.cos(6*t)/2 + math.sin(10*t)/3
    return xt

def y(t):
    yt = math.sin(16*t) + math.sin(6*t)/2 + math.cos(10*t)/3
    return yt

plot(x, y, -2, 2, 0.001)
plt.show()

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

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

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

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

Prog-02: Beautiful Parametric Equation
?????????? นาย???? ????
$ x(t)=3.5( \sin ( (\pi)(t) + 8)) $
$ y(t)=9(\sin(t)) $
โปรแกรมนี้แสดงกราฟที่เรียบง่าย ด้วยลวดลายที่อ่อนช้อย
กราฟที่ได้เลือกมา ผมได้เป็นผู้เลือกเอง เเละเขียนนิพจน์คณิตศาสตร์ด้วยตัวเอง

In [19]:
def x(t):
    xt = 3.5*math.sin(math.pi*t + 8)
    return xt
    

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

plot(x, y,-100 ,100 ,0.001)
plt.show()

Prog-02: Beautiful Parametric Equation
?????????? ???? ????
$x(t)=cos(t)+cos(6t)/2+sin(14t)/3$
$y(t)=sin(t)+sin(6t)/2+cos(14t)/3$
โปรแกรมทำรูปออกมาได้สวยกว่าที่คิด
สมการนี้เป็นสมการที่ผมเลือกมาด้วยตนเอง

In [20]:
def x(t):
    xt = math.cos(1*t) +  math.cos(6*t)/2 + math.sin(14*t)/3
    return xt
def y(t):
    yt = math.sin(6*t) +  math.sin(6*t)/2 + math.cos(14*t)/3
    return yt
plot(x, y, -75,75, 0.5)
plt.show()

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

In [21]:
def x(t):
    xt = math.sin(t)*((math.e**(math.cos(t))-2*math.cos(4*t)-(math.sin(t/12)**5)))
    return xt

def y(t):
    yt = math.cos(t)*((math.e**(math.cos(t))-2*math.cos(4*t)-(math.sin(t/12)**5)))
    return yt

plot(x, y, -2, 2*math.pi, 0.001)
plt.show()

Prog-02: Beautiful Parametric Equation
?????????? ???? ????
$x(t)=t+(cos(16t))/t$
$y(t)=t+(sin(16t))/t$
โปรแกรมนี้สุดปัง เจ๋งกว่าโปรแกรมใดๆในโลก
ผมเลือกสมการนี้จากความชอบของผมเอง

In [22]:
def x(t):
    xt = t+(math.cos(16*t))/t
    return xt
def y(t) :
    yt = t+(math.sin(16*t))/t
    return yt

plot(x, y, 0.2, 20, 0.01)
plt.show()

Prog-02: Beautiful Parametric Equation
?????????? นาย???? ????
$x(t)=11cost-6cos(11/6t)$
$y(t)=11sint-6sin(11/6t)$
ไม่มีครับ
ผมเป็นผู้เลือกและเขียนนิพจน์คณิตศาสตร์ของสมการที่เลือก

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

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

In [24]:
def x(t):
    xt = 11*math.cos(t)-(6*(math.cos(1.83*t)))
    return xt
def y(t):
    yt = 11*math.sin(t)-(6*(math.sin(1.83*t)))
    return yt

plot(x, y, -19, 19, 0.1)
plt.show()

Prog-02: Beatiful Parametric Equation
?????????? นางสาว???? ????
$ xt = (-7)\cos(t)+20\cos(-0.35t) $
$ yt = (-7)\sin(t)+20\sin(-0.35t) $
โปรแกรมนี้สวยงาม ลายตาดี
ดิฉันเป็นผู้เลือกสมการข้างบนและเขียนนิพจน์คณิตศาสตร์ด้วยตัวเอง

In [25]:
def x(t):
    xt = (-7)*math.cos(t)+20*math.cos(t*(-0.35))
    return xt

def y(t):
    yt = (-7)*math.sin(t)-20*math.sin(t*(-0.35))
    return yt

plot(x, y, 0, 150, 0.01)
plt.show()

Prog-02: Beautiful Parametric Equation
?????????? ???? ????
$x(t)=(a+b)cost-bcos((a/b + 1)t)$
$y(t)=(a+b)sint-bsin((a/b + 1)t)$
โปรแกรมนี้เป็นการวาดเส้นโค้งซ้อนทับกันอย่างสวยงาม
ผมเป็นผู้เลือกสมการข้างบนและเขียนนิพจน์คณิตศาสตร์ด้วยตัวเอง

In [26]:
def x(t):
    xt = 8*math.cos(t) - 8*math.cos((5/3 + 1)*t)
    return xt

def y(t):
    yt = 8*math.sin(t) - 8*math.sin((5/3 + 1)*t)
    return yt

plot(x, y, -20, 20, 0.1)
plt.show()

Prog-02: Beautiful Parametric Equation
?????????? นาย ???? ????
$ x(t) = x(t) = cos(t)-cos(80t)^{3} $
$ y(t) = y(t) = sin(80t)-sin(80t)^{4} $
หัวใจของผมที่ซ้อนกันสวยมาก เพราะผมกำหนดค่า dt ไว้ที่ 0.0001
ผมเป็นผู้เลือกสมการและเขียนนิพจน์คณิตศำสตร์ด้วยตัวเอง

In [27]:
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, 0, 2*math.pi, 0.0001)
plt.show()

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

In [28]:
def x(t):
    xt = math.sin(t)*(math.e**math.cos(t)-2*math.cos(4*t)-math.sin((t/12)**5))
    return xt
def y(t):
    yt = math.cos(t)*(math.e**math.cos(t)-2*math.cos(4*t)-math.sin((t/12)**5))

    return yt

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

Prog-02: Beautiful Parametric Equation
?????????? ???? ????
$x(t) = 2cos(t) + sin(2t) cos(60t)$
$y(t) = sin(2t) + sin(60t)$
โปรแกรมนี้แสดงผลคล้ายรูป3มิติ
ยืนยันว่าเลือกสมการมาเองจากhttps://www.quora.com/What-are-the-most-interesting-equation-plots

In [29]:
def x(t):
 xt = 2*math.cos(t) + math.sin(2*t)*math.cos(60*t)
 return xt
def y(t):
 yt = math.sin(2*t) + math.sin(60*t)
 return yt
plot(x, y, -8, 8, 0.01)
plt.show()

Prog-02: Beautiful Parametric Equation
?????????? ???? ????
$x(t)=sin(t)(e^cos(t)-2cos(4t)-sin^5(t/12))$
$y(t)=cos(t)(e^cos(t)-2cos(4t)-sin^5(t/12))$
โปรแกรมนี้เมื่อมองแล้วไม่สามารถละสายตาได้
ผมเป็นผู้เลือกสมการและเขียนนิพจน์ด้วยตัวเอง

In [30]:
def x(t):
     xt = math.sin(t) * ((math.e**math.cos(t)) - (2*math.cos(4*t)) - (math.sin(t/12)**5))
     return xt
    
def y(t): 
     yt = math.cos(t) * ((math.e**math.cos(t)) - (2*math.cos(4*t)) - (math.sin(t/12)**5))
     return yt
    
plot(x, y, 0, 12*math.pi, 0.001)
plt.show()

Prog-02: Beautiful Parametric Equation
?????????? นาย???? ????
$ cos(at) - (cos(bt))**3 $
$ y(t) = sin(ct) - (sin(dt))**3 $
โปรแกรมนี้วาดลวดลายหลายเหลี่ยมดูแล้วลายตา แต่ก็มีความเป็น pattern อยู่บ้าง ปล.ถ้าลองใส่ค่าคงที่เท่ากันทั้งหมดจะเป็นรูปที่มี pattern
ผมได้ทำการเลือกสมการทั้งสองซึ่งสามารถใส่ค่าคงทีได้เอง และทดสอบหลายแบบจนออกมาเป็นรูปนี้ครับผม

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

def y(t):
    yt = math.sin(3*t) - (math.sin(4*t))**3 
    return yt
plot(x, y, 0, 1000 ,10 )
plt.show()

Prog-02: Beautiful Parametric Equation
?????????? ???? ????
$x(t)=0.1\cos(t)-10\cos(\frac{200}{199}t)$
$y(t)=11\sin(t)6\sin(\frac{200}{199}t)$
บันท้ายอันกลมมนและสวยงาม
ผมเป็นผู้เลือกสมการทั้งหมดนี้และเขียนนิพจน์คณิตศาสตร์ด้วยตัวเองอย่างสุดความสามารถ

In [32]:
def x(t):
    xt = 0.1*math.cos(t) - 10*math.cos(200/199*t)
    return xt
def y(t):
    yt = 11*math.sin(t) * 6*math.sin(200/199*t)
    return yt
plot(x, y, 0, 125.2*math.pi, 0.01)
plt.show()

Prog-02: Beautiful Parametric Equation
?????????? นาย???? ????
$x(t)=10(sin(9.9t))(round((cos(cos(10t)))^0.5))$
$y(t)=9((cos(9.9t))^2)(sin(sin(10t)))$
โปรแกรมนี้มีภาพสวยงาม
ผมเป็นผู้เลือกสมการข้างบนและเขียนนิพจน์คณิตศาสตร์ด้วยตัวเอง

In [33]:
def x(t):
    xt = 10*math.sin(9.9*t)*round(math.cos(math.cos(10*t))**0.5)
    return xt
def y(t):
    yt = 9*((math.cos(9.9*t))**2)*math.sin(math.sin(10*t))
    return yt
plot(x, y, -8, 8, 0.01)
plt.show()

Prog-02: Beautiful Parametric Equation
?????????? นาย???? ????
$x(t)=39cos(t) + 40cos(39t)$
$y(t)=39sin(t) - 40sin(39t)$
โปรแกรมนี้ดัดแปลงจาก Hypocycloid โดยพยายามจะทำให้เป็น Perfect Circular
ผมเป็นผู้เลือกสมการข้างบนและเขียนนิพจน์คณิตศาสตร์ด้วยตัวเอง

In [34]:
a = 40 ; b = 1 #ผมใช้ตอนปรับค่าเลขจะได้ง่ายๆ
def x(t):
    xt = (a - b)*math.cos(t) + a*math.cos(((a/b)-1)*t)
    return xt
def y(t):
    yt = (a - b)*math.sin(t) - a*math.sin(((a/b)-1)*t)
    return yt

plot(x, y, 0,10,0.01)
plt.show()

Prog-02: Beautiful Parametric Equation
?????????? ???? ????
$x(t)=cos(16t)+(cos(10t)/8)+(sin(10t)/8)$
$y(t)=sin(16t)+(sin(10t)/3)+(cos(10t)/3)$
โปรแกรมนี้แสดงรูปที่มีความแปลกแต่สวยงาม
ผมเป็นคนเลือกสมการด้านบนและเขียนนิพจน์คณิตศาสตร์ด้วยตัวผมเอง

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

Prog-02: Beautiful Parametric Equation
?????????? ???? ????
$ x(t)=sin(1.07t + pi)* e^(-0.03t) $
$ y(t)=sin(t) * e^(-0.03t) $
โปรแกรมนี้วาดด้วยลายเส้นโค้งสวยงามคล้ายระบบสุริยะ
ผมเป็นผู้เลือกสมการด้านบนและคิดนิพจน์คณิตศาสตร์ด้วยตนเอง

In [36]:
def x(t):
 xt = math.sin(1.07*t+math.pi)*math.exp(-0.03*t)
 return xt
def y(t):
 yt = math.sin(t) * math.exp(-0.03*t)
 return yt
plot(x, y, 0, 36*math.pi, 0.01)
plt.show()

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

In [37]:
def x(t):
    xt = 2*(math.cos(3*t))
    return xt
def y(t):
    yt = 2*(math.sin(2*t))
    return yt
plot(x, y, 0, 500, 0.05)
plt.show()

Prog-02: Beautiful Parametric Equation
?????????? ???? สุรีย์
$x(t) = 7 \times sin(50.56t) \div ( 1 + ( (cos(100.56t))^2 ) )$
$y(t) = 7 \times cos(50.56t) \times (sin(9.24t))^4$
โปรแกรมนี้วาดรูปได้อย่างสวยงามมาก ๆ รู้สึกถึงศิลปะขั้นสูง
ผมเป็นผู้เลือกสมการข้างบนและเขียนนิพจน์คณิตศาสตร์ด้วยตัวเอง

In [38]:
def x(t):
    xt = 7 * ( ( math.sin(50.56*t) ) / ( 1 + ( (math.cos(100.56*t))**2 ) ) )
    return xt

def y(t):
    yt = 7 * math.cos(50.56*t) * ((math.sin(9.24*t))**4)
    return yt

plot(x, y, -3, 3, 0.00001)
plt.show()

Prog-02: Beautiful Parametric Equation
?????????? ???? ????
$x_t = cos(7t)cos(11t)$
$y_t = cos(7t)sin(11t)$
โปรแกรมนี้สวยงามสะดุดตา
ผมเป็นผู้เลือกสมการข้างบนและเขียนนิพจน์คณิตศาสตร์ด้วยตัวเอง

In [39]:
def x(t):
    xt = (math.cos(7*t))*(math.cos(11*t))
    return xt

def y(t):
    yt = (math.cos(7*t))*(math.sin(11*t))
    return yt

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

Prog-02: Beautiful Parametric Equation
?????????? นาย ???? ????
$x(t)=t−1.6cos(24t)$
$y(t)=t-1.6cos(25t)$
ภาพที่ได้จากโปรแกรมนี้คล้ายๆลูกข่าง 2 ลูก หมุนควงสว่านติดกันในแนวเฉียง เห็นว่าน่าสนใจดีจึงนำมาใส่ครับ
ผมเป็นคนเลือกหาและเขียนสมการลงไปในโปรแกรมด้วยตัวเองครับ

In [40]:
def x(t):
    xt = t-1.6*math.cos(24*t)
    return xt

def y(t):
    yt = t - 1.6*math.cos(25*t)
    return yt

plot(x, y, -2*math.pi, 2*math.pi, 0.0001)
plt.show()

Prog-02: Beutiful of Parametric Equation
?????????? ???? ????
$x(t)=sin(7πt) $
$y(t)=cos(5πt) $
โปรแกรมแสดงภาพออกมาได้เท่มาก
อนึ่ง ผม????ขอยืนยันว่าผมเป็นผู้เขียนโปรแกรมนี้ด้วยตนเองอย่างภาคภูมิใจยิ่ง

In [41]:
def x(t):
     xt = math.sin(7*math.pi*t)
     return xt
def y(t):
     yt = math.cos(5*math.pi*t)
     return yt
plot(x, y, 0, 9,0.1)
plt.show()

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

In [42]:
def x(t):
    xt = math.cos(t)-math.cos(100*t)*math.sin(t)
    return xt
def y(t):
    yt = 2*math.sin(t)-math.sin(100*t)
    return yt
    
plot(x, y, 0, 2*math.pi, 0.001)
plt.show()

Prog-02: Beautiful Parametric Equation
?????????? ???? ????
$x(t)=6(cos(10.52t))^4sin(sin(4.7t))$
$y(t)=6sin(10.52t)\sqrt{cos(cos(4.7t))}$
โปรแกรมนี้วาดลวดลายได้สวยงาม
ผมเป็นผู้เลือกสมการข้างบนและเขียนนิพจน์คณิตศาสตร์ด้วยตัวเอง

In [43]:
def x(t):
 xt = 6*math.cos(10.52*t)**4*math.sin(math.sin(4.7*t))
 return xt
def y(t):
 yt = 6*math.sin(10.52*t)*math.cos(math.cos(4.7*t))**0.5
 return yt
plot(x, y, -8, 8, 0.001)
plt.show()

Prog-02: Beautiful Parametric Equation
?????????? ???? ????
$x(t)=7SIN(13.58t)ROUND(SQRT(COS(COS(7.4t))),0)$
$y(t)=6^(COS(13.58t),4)SIN(SIN(7.4t))$
โปรแกรมนี้ลวดลายสวยงามมองแล้วต้องตกใจ
ผมเป็นผู้เลือกสมการข้างบนและเขียนนิพจน์คณิตศาสตร์ด้วยตัวเอง

In [44]:
def x(t):
    xt =  7*math.sin(13.58*t)*round(math.sqrt(math.cos(math.cos(7.4*t))),0)
    return xt

def y(t):
    yt =  6*pow(math.cos(13.58*t),4)*math.sin(math.sin(7.4*t)) 
    return yt
plot(x, y, -8, 8, 0.01)
plt.show()

Prog-02: Beautiful Parametric Equation
?????????? ???? เดชรัตนสนุทร
LaTex code ของสมการ $x(t)=cos(7t)cos(11t)$
LaTex code ของสมการ $y(t)=cos(7t)sin(11t)$
เป็นรูปวงกลมซ้อนกันอย่างสวยงาม
นิสิตเป็นผู้เลือกเเละเขียนนิพจน์คณิตศาสตร์ของสมการที่เลือก

In [45]:
def x(t):
    xt = (math.cos(7*t))*(math.cos(11*t)) 
    return xt
def y(t):
    yt = (math.cos(7*t))*(math.sin(11*t))  
    return yt
plot(x, y, 0, 2*math.pi, 0.01)
plt.show()

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

In [46]:
def x(t):
    xt = math.cos(t)-math.cos(100*t)*math.sin(t)
    return xt

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

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

Prog-02: Beautiful Parametric Equation
?????????? นาย???? ????
$x(t)=6\times\sin(9.52\times t)\times\sqrt{\cos(\cos(6.4\times t))}$
$y(t)=6\times\cos^4(9.52\times t)\times\sin(\sin(6.4\times t))$
โปรแกรมนี้วาดรูปกลีบดอกไม้อันสวยงาม ซึ่งในบางทีหากเราไม่ตั้งใจมองก็อาจจะเห็นเส้นรอบกลีบขยับได้ดั่งภาพลวงตา
ผมเป็นผู้เลือกสมการข้างบนและเขียนนิพจน์คณิตศาสตร์ด้วยตัวเอง

In [47]:
def x(t):
    xt = 6*math.sin(9.52*t)*(math.sqrt(math.cos(math.cos(6.4*t))))
    return xt

def y(t):
    yt = 6*(math.cos(9.52*t)**4)*math.sin(math.sin(6.4*t))
    return yt

plot(x, y, -8, 8, 0.001)
plt.show()

Prog-02: Beautiful Parametric Equation
?????????? นาย???? ????
$x(t)=1.5*cos(t) - cos(10*t)$
$y(t)=1.5*sin(t) - sin(10*t)$
โปรแกรมนี้วาดลวดลายวงกลมขย่มใจเธอ
ผมเป็นผู้เลือกสมการข้างบนและเขียนนิพจน์คณิตศาสตร์ดด้วยตัวเอง

In [48]:
def x(t):
    xt = 1.5*math.cos(t) - math.cos(10*t)
    return xt
def y(t):
    yt = 1.5*math.sin(t) - math.sin(10*t)
    return yt
plot(x, y, 0, 4*math.pi, 0.01)
plt.show()

Prog-02: Beautiful Parametric Equation
?????????? นาย???? ????
$x(t)=cos(t)-cos(80t)^3$
$y(t)=sin(t)-sin(80t)^4$
ช่องเจ็ดสี?
ผมเป็นผู้เลือกสมการเเละเขียนโปรแกรมด้วยตนเองตามโจทย์

In [49]:
def x(t):
    xt = math.cos(t)-(math.cos(80*t))**3
    return xt
def y(t):
    yt = math.sin(t)-(math.sin(80*t))**4
    return yt
plot(x, y, -1, 80, 0.0001)
plt.show()

Prog-02: Beautiful Parametric Equation
?????????? ???? ????
$x(t)= 4 \pi t + 4 \pi[\cos (80 \pi t) - \cos (2 \pi t)]$
$y(t)= \cos (4 \pi t) + 4 \pi[\sin (80 \pi t) - \sin (2 \pi t)]$
โปรแกรมนี้แสดงภาพที่สามารถมองในมุมมองแบบ3มิติได้เป็นอุโมงค์ที่คดเคี้ยว
ผมขอยืนยันว่าเป็นผู้สรรหาสมการที่จะนำมาเขียนกราฟและเขียนนิพจน์คณิตศาสตร์ด้วยตนเอง

In [50]:
def x(t):
    xt = (4*math.pi*(t))+(4*math.pi*(math.cos(80*math.pi*(t))-math.cos(2*math.pi*(t))))
    return xt

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

plot(x, y, 0, 1, 0.0001)
plt.show()

Prog-02: Beautiful Parametric Equation
?????????? ???? ????
$ xt = 4*math.sin((12/13)*t) $
$ yt = 3*math.sin(t) $
โปรแกรมนี้วาดลวดวลายตาข่ายอย่างสวยงาม
ผมเป็นผู้เลือกสมกำรข้ำงบนและเขียนนิพจน์คณิตศำสตร์ด้วยตัวเอง

In [51]:
def x(t):
 xt = 4*math.sin((12/13)*t)
 return xt
def y(t):
 yt = 3*math.sin(t)
 return yt
plot(x, y, -100, 100, 0.01)
plt.show()

Prog-02: Beautiful Parametric Equation
6330000021 ???? ????
$x(t)=2t+2cos(14t)+\frac{1}{t}$
$y(t)=2t+2sin(15t)+\frac{1}{t}$
จำเป็นต้องเขียนด้วยหรือครับอาจารย์
ผมได้เลือกสมการข้างบนและเขียนนิพจน์ทางคณิตศาสตร์ด้วยตนเอง

In [52]:
def x(t):
 xt = 2*t + 2*math.cos(14*t)+(1/t)
 return xt
def y(t):
 yt = 2*t + 2*math.sin(15*t)+(1/t)
 return yt
plot(x, y, 1, 27, 1e-2)
plt.show()
In [ ]:
 

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

In [53]:
def x(t):
    xt = t - 1.6*math.cos(24*t)
    return xt
def y(t):
    yt = t - 1.6*math.sin(25*t)
    return yt
plot(x, y, -11, 8, 0.01)
plt.show()

Prog-02: Beautiful Parametric Equation
?????????? ???? ????
$ x(t)=5|t^{2}-5| $ y(t)=cos(t^2)
โปรแกรมนี้มีความผันผวนทางตัวเลขสูงมาก ขอให้อ.เข้าใจในรูปหน้าผา
นิสิตได้คิดนิพจน์นี้และเขียนนิพจน์คณิตศาสตร์นี้ด้วยตรเองโดยมิได้ปรึกษาหรือเปืดหาข้อมูลใดๆทั้งสิ้น

In [54]:
def x(t):
    xt = 5*(abs(t**2)-5)
    return xt

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


plot(x, y, 0, 50, 0.6)
plt.show()

Prog-02 : Beatiful Parametric Equation
?????????? ???? ????
$ x(t)=cos(t)-cos(100t)sin(t) $
$ y(t)=2sin(t)-sin(100t) $
โปรแกรมนี้สามารถวาดกราฟออกมาได้อย่างสวยงามหลายรูปแบบ
ผมเป็นผู้เลือกสมการข้างบนและเขียนนิพจน์คณิตศาสตร์ด้วยตนเองครับ

In [55]:
def x(t):
    xt = math.cos(t)-math.cos(100*(t))*math.sin(t)
    return xt

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

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

Prog-02 : Beatiful Parametric Equation
?????????? ???? ????
$ x(t)=4cos(-11t/4)+7cos(t) $
$ y(t)=4sin(-11t/4)+7sin(t) $
โปรแกรมนี้สามารถวาดออกมาได้หลากหลายแบบมาก
ดิฉันเป็นผู้เลือกสมการข้างบนและเขียนนิพจน์คณิตศาสตร์ด้วยตนเองค่ะ

In [56]:
def x(t):
    xt = 4*math.cos((-11/4)*t)+7*math.cos(t) 
    return xt

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

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