DL_pintoja.wxm 1 / 11 (%i1) load(draw)$ 1 Pallo 1.1 Pallokoordinaatit (%i) s(theta, tau):= [cos(theta)*cos(tau), sin(theta)*cos(tau), sin(tau)]; (%o) s θ, τ := [ cos θ cos τ, sin θ cos τ, sin τ ] (%i3) wxdraw3d(proportional_axes=xyz, surface_hide=true, parametric_surface(s(theta, tau)[1], s(theta, tau)[], s(theta, tau)[3], theta,-%pi,%pi, tau,-%pi/,%pi/) )$ (%t3) 1. Puolipallo funktion kuvaajana (%i4) r:1$ (%i5) f:sqrt(r^ - (x^+y^)); (%o5) - y - x + 1 (%i6) wxdraw3d(proportional_axes=xyz, surface_hide=true, explicit(f, x,-r,r, y,-r,r) )$ (%t6) Parametrialueen tulee olla suorakaide; parametrisoidaan xy-tason yksikköympyrä napakoordinaattien avulla:
DL_pintoja.wxm / 11 (%i7) [s_x,s_y,s_z]:trigsimp(ev([x,y,f], x=rho*cos(theta), y=rho*sin(theta))); (%o7) [ ρ cos θ, ρ sin θ, 1 - ρ ] (%i8) wxdraw3d(proportional_axes=xyz, surface_hide=true, parametric_surface(s_x, s_y, s_z, rho,0,r, theta,-%pi,%pi) )$ (%t8) 1.3 Stereografinen projektio (%i9) kill(values)$ Stereografisen projektion käänteiskuvauksen määräävät lausekkeet: (%i10) spk(u,v):=[*u/(u^ + v^ + 1), *v/(u^ + v^ + 1), (u^ + v^ - 1)/(u^ + v^ + 1)]; u v (%o10) spk u, v := [,, u + v - 1 ] u + v + 1 u + v + 1 u + v + 1 (%i11) wxdraw3d(proportional_axes=xyz, surface_hide=true, xu_grid=30, yv_grid=0, parametric_surface(spk(u,v)[1], spk(u,v)[], spk(u,v)[3], u,-3,3, v,-3,3) )$ (%t11)
DL_pintoja.wxm 3 / 11 --> with_slider_draw3d(t, makelist(0.1*j,j,1,10), proportional_axes=xyz, surface_hide=true, xu_grid=30, yv_grid=0, xrange=[-1,1], yrange=[-1,1], zrange=[-1,1], parametric_surface(spk(u,v)[1], spk(u,v)[], spk(u,v)[3], u,-t*3,t*3, v,-t*3,t*3) )$ Parametrisoidaan uv-taso napakoordinaattien avulla (nähdään, miten ympyrän muotoiset alueet kuvautuvat): (%i1) ev([spk(u,v)[1], spk(u,v)[], spk(u,v)[3]], u=r*cos(theta), v=r*sin(theta)); r cos θ r sin θ (%o1) [,, r sin θ + r cos θ - 1 ] r sin θ + r cos θ + 1 r sin θ + r cos θ + 1 r sin θ + r cos θ + 1 (%i13) [sp_x,sp_y,sp_z]:trigsimp(%); (%o13) [ r cos θ r + 1, r sin θ r + 1, r - 1 ] r + 1 (%i14) wxdraw3d(proportional_axes=xyz, surface_hide=true, xu_grid=30, yv_grid=0, view=[63, 340], parametric_surface(sp_x, sp_y, sp_z, r,0,5, theta,-%pi/,%pi) )$ (%t14) (%i15) wxdraw3d(proportional_axes=xyz, surface_hide=true, xu_grid=30, yv_grid=0, view=[63, 340], parametric_surface(sp_x, sp_y, sp_z, r,0,4, theta,-%pi/,%pi), xu_grid=10, yv_grid=15, parametric_surface(r*cos(theta), r*sin(theta), -1, r,0,4, theta,-%pi/,%pi) )$ (%t15)
DL_pintoja.wxm 4 / 11 Torus (%i16) kill(values)$ (%i17) (a:3, b:1)$ (%i18) t(theta, tau):=[cos(theta)*(a+b*cos(tau)), sin(theta)*(a+b*cos(tau)), b*sin(tau)]; (%o18) t θ, τ := [ cos θ a + b cos τ, sin θ a + b cos τ, b sin τ ] (%i19) wxdraw3d(proportional_axes=xyz, surface_hide=true, view=[60,30], xrange=[-a-1,a+1], yrange=[-a-1,a+1], zrange=[-b,b], parametric_surface(t(theta, tau)[1], t(theta, tau)[], t(theta, tau)[3], theta,-%pi,%pi/, tau,-%pi,%pi) )$ (%t19) --> with_slider_draw3d(t, makelist(j**%pi/30,j,1,30), /*proportional_axes=xyz,*/ surface_hide=true, view=[60,30], xrange=[-a-1,a+1], yrange=[-a-1,a+1], zrange=[-b,b], parametric_surface(t(theta, tau)[1], t(theta, tau)[], t(theta, tau)[3], theta,-%pi,%pi/, tau,-%pi,%pi), color=green, line_width=3, parametric(a*cos(theta), a*sin(theta), 0, theta,-%pi,%pi), color=red, parametric(t(t, tau)[1], t(t, tau)[], t(t, tau)[3], tau,-%pi,%pi) )$ --> with_slider_draw3d(t, makelist(j**%pi/30,j,1,30), /*proportional_axes=xyz,*/ surface_hide=true, view=[60,30], xrange=[-a-1,a+1], yrange=[-a-1,a+1], zrange=[-b,b], parametric_surface(t(theta, tau)[1], t(theta, tau)[], t(theta, tau)[3], theta,-%pi,%pi/, tau,-%pi,%pi), color=red, line_width=3, parametric(t(theta, t)[1], t(theta, t)[], t(theta, t)[3], theta,-%pi,%pi) )$ 3 Scherkin minimipinta (%i0) equ:cos(x)*%e^z-cos(y); (%o0) cos x %e z - cos y
DL_pintoja.wxm 5 / 11 (%i1) f:log(cos(y)/cos(x)); (%o1) log cos y cos x (%i) wxdraw3d(surface_hide=true, xrange=[-1.56,1.56], yrange=[-1.56,1.56], zrange=[-6,6], explicit(f, x,-1.56,1.56, y,-1.56,1.56) )$ (%t) (%i3) wxdraw3d(enhanced3d=true, surface_hide=true, x_voxel=5, y_voxel=5, z_voxel=5, implicit( equ=0, x,-%pi,%pi, y,-%pi,%pi, z,-6,6) )$ (%t3) 4 Pyörähdyspintoja (%i4) kill(values)$ 4.1 Ketjukäyrä (%i5) f:cosh(t)$
DL_pintoja.wxm 6 / 11 (%i6) wxdrawd(proportional_axes=xy, explicit(f, t,-1,1) )$ (%t6) Pyöräytys x-akselin suhteen (%i7) [sr_x,sr_y,sr_z]:[t, f*cos(theta), f*sin(theta)]; (%o7) [ t, cosh t cos θ, cosh t sin θ ] (%i8) wxdraw3d(proportional_axes=xyz, surface_hide=true, parametric_surface(sr_x, sr_y, sr_z, theta,-%pi,%pi, t,-1,1) )$ (%t8) Pyöräytys z-akselin suhteen (%i9) [sr_x,sr_y,sr_z]:[t*cos(theta), t*sin(theta), f]; (%o9) [ t cos θ, t sin θ, cosh t ]
DL_pintoja.wxm 7 / 11 (%i30) wxdraw3d(proportional_axes=xyz, surface_hide=true, parametric_surface(sr_x, sr_y, sr_z, theta,-%pi,%pi, t,0,1) )$ (%t30) 4. Pascalin simpukka (%i31) kill(values)$ Pascalin simpukka (pyöräytys z-akselin suhteen): (%i3) rc:b-cos(t); (%o3) b - cos t (%i33) [xc,yc]:subst(0.5,b,rc*[cos(t), sin(t)]); (%o33) [ 0.5 - cos t cos t, 0.5 - cos t sin t ] (%i34) wxdrawd(proportional_axes=xy, nticks=00, yaxis=true, parametric(xc, yc, t,-%pi,%pi) )$ (%t34) (%i35) [sr_x,sr_y,sr_z]:[xc*cos(theta), xc*sin(theta), yc]; (%o35) [ 0.5 - cos t cos t cos θ, 0.5 - cos t cos t sin θ, 0.5 - cos t sin t ]
DL_pintoja.wxm 8 / 11 (%i36) wxdraw3d(proportional_axes=xyz, surface_hide=true, xu_grid=30, yv_grid=35, parametric_surface(sr_x, sr_y, sr_z, theta,-%pi,%pi/, t,0,*%pi) )$ (%t36) (%i37) [xc,yc]:subst(1.3,b,rc*[cos(t), sin(t)]); (%o37) [ 1.3 - cos t cos t, 1.3 - cos t sin t ] (%i38) wxdrawd(proportional_axes=xy, nticks=00, yaxis=true, parametric(xc, yc, t,-%pi,%pi) )$ (%t38) (%i39) [sr_x,sr_y,sr_z]:[xc*cos(theta), xc*sin(theta), yc]; (%o39) [ 1.3 - cos t cos t cos θ, 1.3 - cos t cos t sin θ, 1.3 - cos t sin t ]
DL_pintoja.wxm 9 / 11 (%i40) wxdraw3d(proportional_axes=xyz, surface_hide=true, xu_grid=30, yv_grid=35, parametric_surface(sr_x, sr_y, sr_z, theta,-%pi,%pi/, t,0,*%pi) )$ (%t40) 5 Suunnistumattomia pintoja (%i41) kill(values)$ 5.1 Möbiuksen nauha (%i4) mb(theta, tau):= s(theta, 0) + tau*s(theta, theta/); (%o4) mb θ, τ := s θ, 0 + τ s θ, θ (%i43) mb(theta, tau); (%o43) [ τ cos θ cos θ + cos θ, τ cos θ sin θ + sin θ, τ sin θ ] (%i44) wxdraw3d(proportional_axes=xyz, surface_hide=true, enhanced3d=false, xu_grid=30, yv_grid=10, parametric_surface(mb(theta, tau)[1], mb(theta, tau)[], mb(theta, tau)[3], theta,-%pi,%pi, tau,-0.3,0.3) )$ (%t44) Möbiuksen nauha syntyy, kun jana kiertää pitkin ympyrää samalla kiertyen 180 astetta:
DL_pintoja.wxm 10 / 11 (%i45) jmb(theta, tau, s):= s(theta, 0) + tau*s(theta, s*theta/); (%o45) jmb θ, τ, s := s θ, 0 + τ s θ, s θ (%i46) jmb(theta, tau, s); (%o46) [ τ cos θ cos s θ + cos θ, τ sin θ cos s θ + sin θ, τ sin s θ ] Tässä z-akselin suuntainen jana lähtee pisteestä (-1,0,0); janan päät on merkitty eri värisiksi ja pitkin yksikköympyrää liikkuva keskipiste mustaksi: --> with_slider_draw3d(theta, makelist(-%pi+(*%pi/30)*j,j,0,30), enhanced3d=false, surface_hide=true, xu_grid=0, yv_grid=10, xrange=[-1.4,1.4], yrange=[-1.4,1.4], zrange=[-0.5,0.5], parametric(cos(t), sin(t), 0, t,0,*%pi), line_width=3, parametric(mb(theta, tau)[1], mb(theta, tau)[], mb(theta, tau)[3], tau,-0.3,0.3), point_type=filled_circle, point_size=, color=black, points([ [-1,0,0] ]), points([ mb(theta, 0) ]), color=green, points([ mb(theta, -0.3) ]), color=red, points([ mb(theta, 0.3) ]) )$ --> with_slider_draw3d(st, makelist(j/10,j,0,10), enhanced3d=false, surface_hide=true, xu_grid=0, yv_grid=10, xrange=[-1.4,1.4], yrange=[-1.4,1.4], zrange=[-0.5,0.5], parametric_surface(jmb(theta, tau, st)[1], jmb(theta, tau, st)[], jmb(theta, tau, st)[3], theta,-%pi,%pi, tau,-0.3,0.3) )$ 5. Kleinin pullo Eräs malli Kleinin pullolle saadaan, kun annetaan kahdeksikon mutoisen käyrän kiertää pitkin ympyrää samalla kiertyen 180 astetta: (%i47) wxdrawd(nticks=100, parametric( sin(*tau), sin(tau), tau,-%pi,%pi) )$ (%t47) (%i48) s_dtau(theta, tau):= ''(diff(s(theta, tau), tau)); (%o48) s_dtau θ, τ := [ - sin τ cos θ, - sin τ sin θ, cos τ ]
DL_pintoja.wxm 11 / 11 (%i49) kb(theta, tau):= r*s(theta,0) + sin(tau)*s(theta, theta/) + sin(*tau)*s_dtau(theta, theta/); (%o49) kb θ, τ := r s θ, 0 + sin τ s θ, θ + sin τ s_dtau θ, θ Tässä xz-tasossa sijaitseva kahdeksikkokäyrä lähtee liikkumaan pitkin xy-tason yksikköympyrää samalla kiertyen. (%i50) r:3$ (%i51) wxdraw3d(enhanced3d=false, surface_hide=true, xu_grid=40, yv_grid=30, view=[60,80], parametric_surface(kb(theta, tau)[1], kb(theta, tau)[], kb(theta, tau)[3], theta,-0.9*%pi,0.9*%pi, tau,-%pi,%pi) )$ (%t51) --> with_slider_draw3d(t, makelist(0.1*j,j,,10), enhanced3d=false, surface_hide=true, xu_grid=40, yv_grid=0, view=[60,80], xrange=[-4.,4.], yrange=[-4.,4.], zrange=[-,], parametric_surface(kb(theta, tau)[1], kb(theta, tau)[], kb(theta, tau)[3], theta,-0.95*%pi,0.95*%pi, tau,-t*%pi,t*%pi) )$ (%i5) k8p_kb(theta, tau, s):= r*s(theta,0) + sin(tau)*s(theta, s*theta/) + sin(*tau)*s_dtau(theta, s*theta/); (%o5) k8p_kb θ, τ, s := r s θ, 0 + sin τ s θ, s θ + sin τ s_dtau θ, s θ --> with_slider_draw3d(st, makelist(j/10,j,0,10), enhanced3d=false, surface_hide=true, xu_grid=40, yv_grid=0, view=[60,80], xrange=[-4.,4.], yrange=[-4.,4.], zrange=[-,], parametric_surface(k8p_kb(theta, tau, st)[1], k8p_kb(theta, tau, st)[], k8p_kb(theta, tau, st)[3], theta,-0.9*%pi,0.9*%pi, tau,-%pi,%pi) )$