%s', '表示', $_SERVER['PHP_SELF'], '非表示'); } else { $c = 'hide'; $a = sprintf('%s | %s', $_SERVER['PHP_SELF'], '表示', '非表示'); } function aa ($t, $k) { global $a; printf("

%s -- %s [$a]

", $_SERVER['PHP_SELF'], $t, $k, '解答例を', $k); } h('演習(5)'); ?>

x in [0..1], y in [0..1] の範囲での f(x,y) = ex y の等高線グラフ

> c := plot::contour([x, y, exp(x*y)], x = 0..1, y = 0..1)
plot(c)
d := plot::contour([x, y, exp(x*y)], x = 0..1, y = 0..1, Style = Attached)
plot(d)
双曲線
(x, y) = (cosh(t), sinh(t)), t=-1..1
アステロイド
(x, y) = (cos(t)3 ,sin(t)3), t=0..π
カージオイド
(x, y) = ((1 + cos(t)) cos(t), (1 + cos(t)) sin(t)), t=-π..π
サイクロイド
(x, y) = (t - sin(t), 1 - cos(t)), t=0..2π
アルキメデス螺旋
(x, y) = (t cos(t), t sin(t)), t=0..4π
> plot(plot::Curve2d([cosh(t), sinh(t)], t=-1..1))
plot(plot::Curve2d([cos(t)^3, sin(t)^3], t=0..PI))
plot(plot::Curve2d([(1+cos(t))*cos(t), (1+cos(t))*sin(t)], t=-PI..PI), Scaling=Constrained)
plot(plot::Curve2d([t - sin(t), 1 - cos(t)], t=0..2*PI), Scaling=Constrained)
plot(plot::Curve2d([t*cos(t), t*sin(t)], t=0..4*PI), Scaling=Constrained)
円筒
> s := plot::cylindrical([1, u, v], u=-PI..PI, v=-1..1)
plot(s)
(u,u,v) u=-PI..PI, v=-PI..PI / (-u,u,v) u=-PI..PI, v=-2..2
> s1 := plot::cylindrical([u,u,v], u=-PI..PI, v=-PI..PI, Color = RGB::Blue);
s2 := plot::cylindrical([-u,u,v], u=-PI..PI, v=-2..2, Color = RGB::Green);
plot(s1, s2)

sin(x) のグラフ

> plot(plot::Function2d(sin(x), x=0..2*PI))
plot(plot::Function2d(sin(x), x=0..2*PI, y=0..1))
plot(plot::Function2d(sin(x), x=0..2*PI, y=0..1, Color = RGB::Green, Style=[Impulses]))

sin(x*y) のグラフ

> plot(plot::Function3d(sin(x*y), x=0..2*PI, y=-PI..PI))
plot(plot::Function3d(sin(x*y), x=0..2*PI, y=-PI..PI, Color = RGB::Blue))
plot(plot::Function3d(sin(x*y), x=0..2*PI, y=-PI..PI, Color = RGB::Green), Axes = None)

x2+y2=1

> plot(plot::implicit(x^2+y^2-1, x=-1..1, y=-1..1), Scaling=Constrained)

f(x,y) = (1 - 0.99 ex^2+y^2)(x10 - 1 - y), x=-1.25〜1.25, y=-1.1〜2

> plot(plot::implicit((1-0.99*exp(x^2+y^2))*(x^10-1-y), x=-1.25..1.25, y=-1.1..2))
  1. 受講者の誕生月分布を調べる(挙手)
  2. 円グラフを描く
> p := plot::piechart2d([1,2,3], Titles=[1="Jun",2="Feb",3="Mar"], FontSize=20); plot(p)

アルキメデス螺旋

> plot::polar([phi, phi], phi = 0..4*PI)
plot(%) plot(%, Axes=None, Scaling=Constrained)

> s := plot::spherical([1,phi,theta], phi=-PI..PI, theta=0..PI)
plot(s)

ss := plot::modify(s, Color = RGB::Blue)
plot(ss, Scaling=Constrained, Axes = None)
3次元アステロイド
(x, y, z) = (sin(u)3cos(t)3, sin(u)3sin(t)3, cos(u)3), t=0..π, u=0..π
> a := plot::Surface3d([sin(u)^3*cos(t)^3, sin(u)^3*sin(t)^3, cos(u)^3], t=0..PI, u=0..PI)
plot(a)
plot(a, Axes = None)
> r := plot::xrotate(sin(x), x=1..3))
plot(r)
plot(r, Axes = None)
> r := plot::yrotate(sin(x), x=1..3))
plot(r)
plot(r, Axes = None)