데카르트의 엽선(folium)  x^3 + y^3 = 3xy 의 매개방정식 표현은

             x = 3t/(1 + t^3)
            y = 3t^2/(1 + t^3)
               where   -infinity < t < -1, or -1 < t < infinity

이다.

* 윈도우 XP 에서 Mathematica 8 을 이용하여 그린 데카르트의 엽선:





* 윈도우 XP 에서 Maxima 5.25.0 을 이용하여 매개곡선을 그리는 명령



** 위의 명령으로 Maxima 가 별도의 창에 그려준 매개곡선



*** plot2d 대신에 wxplot2d 를 사용하면 뱔도의 창을 열지 않고 같은 창에 그려준다.




 

* 윈도우 XP 에서 윈도우 용 Gnuplot 을 이용하여 그린 함수의 그래프:
(* 윈도우 용 Gnuplot 다운로드: http://www.tatsuromatsuoka.com/gnuplot/Eng/winbin/ *)

** Descartes' folium 을 매개곡선으로 그리기 위한 gnuplot 소스

# set term win
set xrange [-6:6]
set yrange [-6:6]
set title "Descartes' folium"
set parametric
set dummy t
set samples 1600
plot 3*t/(1 + t**3), 3*t**2/(1 + t**3)




** 윈도우 XP 에 설치된 Cygwin-X 에서 Gnuplot 을 실행시킨 모습 




*** Gnuplot 이 그려준 곡선 

 



* Mac OS X Lion 에서 Grapher 를 이용하여 그린 함수의 그래프:

 

 

* 윈도우 XP 의 Python 2.7 에 matplotlib 1.0.1 을 (모두 32비트 용으로) 설치하여 파이썬 소스로 그린 음함수의 그래프:

#!/usr/bin/env python

"""
An example which plots the parametirized curve.
         Plot the Descartes' folium.
"""

import numpy as np
from matplotlib.pyplot import figure, show, rc, title

# radar green, solid grid lines
rc('grid', color='#316931', linewidth=1, linestyle='-')
rc('xtick', labelsize=15)
rc('ytick', labelsize=15)

# force square figure and square axes looks better for polar, IMO
fig = figure(figsize=(8,8))
ax = fig.add_axes([0.1, 0.1, 0.8, 0.8], polar=False, axisbg='#d5de9c')


t = np.arange(0.0, 27.0, 0.05)
x =3*t/(1 + t**3)
y =3*t**2/(1 + t**3)
ax.plot(x, y, color='#ee8d18', lw=3, label='a line')
ax.legend()

t = np.arange(-18, -1.15, 0.05)
x =3*t/(1 + t**3)
y =3*t**2/(1 + t**3)
ax.plot(x, y, color='#ee8d18', lw=3, label='a line')

t = np.arange(-0.82, 0.01, 0.05)
x =3*t/(1 + t**3)
y =3*t**2/(1 + t**3)
ax.plot(x, y, color='#ee8d18', lw=3, label='a line')
# ax.legend()

title("Descartes' folium")
show()


(* 위의 소스는 수정 없이 윈도우 7 의 Python 3.2 64bit 에 matplotlib 1.1.0 64bit 를 설치하여 실행해도 된다 *)


 

Posted by Scripter
,