with(plots); -1 

 

Bunnflaten z=g(r,θ) 

`:=`(g, proc (r, theta) 
options operator, arrow; `+`(`*`(`/`(1, 10), `*`(`^`(r, 2)))) end proc) 

proc (r, theta) options operator, arrow; `+`(`*`(`/`(1, 10), 
`*`(`^`(r, 2)))) end proc (1)
 

Toppflaten z=h(r,θ) 

`:=`(h, proc (r, theta) 
options operator, arrow; `+`(4, theta, `-`(`*`(`/`(1, 4), `*`(r)))) end 
proc) 

proc (r, theta) options operator, arrow; `+`(4, theta, 
`-`(`*`(`/`(1, 4), `*`(r)))) end proc (2)
 

Området R i xy-planet er gitt ved α≤θ≤β og a(θ)≤r≤b(θ) 

 

`:=`(a, proc (theta) 
options operator, arrow; `+`(1, sin(theta)) end proc) 

proc (theta) options operator, arrow; `+`(1, sin(theta)) end proc (3)
 

`:=`(b, proc (theta) 
options operator, arrow; `+`(3, cos(theta)) end proc) 

proc (theta) options operator, arrow; `+`(3, cos(theta)) end proc (4)
 

`:=`(alpha, 0) 

0 (5)
 

`:=`(beta, 
`+`(`*`(`/`(1, 2), `*`(Pi)))) 

`+`(`*`(`/`(1, 2), `*`(Pi))) (6)
 

 

`:=`(P1, plot3d([r, 
theta, 0], theta = alpha .. beta, r = a(theta) .. b(theta), coords = 
cylindrical, style = surface, color = blue)) 

PLOT3D(MESH(Array(1..25, 1..25, 1..3, {(1, 1, 1) = 1.0, (1, 1, 2) =
 1.0, (1, 1, 3) = 1.0, (1, 2, 1) = .0, (1, 2, 2) = .0, (1, 2, 3) = .0, 
(1, 3, 1) = .0, (1, 3, 2) = .0, (1, 3, 3) = .0, (1, 4, 1) = 1.... (7)
 

`:=`(P2, 
plot3d([a(theta), theta, z], theta = alpha .. beta, z = 0 .. 6, coords =
 cylindrical, style = surface, color = grey)) 

PLOT3D(MESH(Array(1..25, 1..25, 1..3, {(1, 1, 1) = 1.0, (1, 1, 2) =
 1.0, (1, 1, 3) = 1.0, (1, 2, 1) = .0, (1, 2, 2) = .0, (1, 2, 3) = .0, 
(1, 3, 1) = .0, (1, 3, 2) = .0, (1, 3, 3) = .0, (1, 4, 1) = 1.... (8)
 

`:=`(P3, 
plot3d([b(theta), theta, z], theta = alpha .. beta, z = 0 .. 6, coords =
 cylindrical, style = surface, color = grey)) 

PLOT3D(MESH(Array(1..25, 1..25, 1..3, {(1, 1, 1) = 4.0, (1, 1, 2) =
 4.0, (1, 1, 3) = 4.0, (1, 2, 1) = .0, (1, 2, 2) = .0, (1, 2, 3) = .0, 
(1, 3, 1) = .0, (1, 3, 2) = .0, (1, 3, 3) = .0, (1, 4, 1) = 4.... (9)
 

`:=`(P4, plot3d([r, 
alpha, z], r = a(alpha) .. b(alpha), z = 0 .. 6, coords = cylindrical, 
style = surface, color = grey)) 

PLOT3D(MESH(Array(1..25, 1..25, 1..3, {(1, 1, 1) = 1.0, (1, 1, 2) =
 1.0, (1, 1, 3) = 1.0, (1, 2, 1) = .0, (1, 2, 2) = .0, (1, 2, 3) = .0, 
(1, 3, 1) = .0, (1, 3, 2) = .0, (1, 3, 3) = .0, (1, 4, 1) = 1.... (10)
 

`:=`(P5, plot3d([r, 
beta, z], r = a(beta) .. b(beta), z = 0 .. 6, coords = cylindrical, 
style = surface, color = grey)) 

PLOT3D(MESH(Array(1..25, 1..25, 1..3, {(1, 1, 1) = 
-0.4102067616e-9, (1, 1, 2) = -0.4102067616e-9, (1, 1, 3) = 
-0.4102067616e-9, (1, 2, 1) = 2.0, (1, 2, 2) = 2.0, (1, 2, 3) = 2.0, (1,
 3, 1) = .0, (1, ... (11)
 

`:=`(P6, plot3d([r, 
theta, g(r, theta)], theta = alpha .. beta, r = a(theta) .. b(theta), 
coords = cylindrical, style = surface)) 

PLOT3D(MESH(Array(1..25, 1..25, 1..3, {(1, 1, 1) = 1.0, (1, 1, 2) =
 1.0, (1, 1, 3) = 1.0, (1, 2, 1) = .0, (1, 2, 2) = .0, (1, 2, 3) = .0, 
(1, 3, 1) = .1, (1, 3, 2) = .1, (1, 3, 3) = .1, (1, 4, 1) = 1.... (12)
 

`:=`(P7, plot3d([r, 
theta, h(r, theta)], theta = alpha .. beta, r = a(theta) .. b(theta), 
coords = cylindrical, style = surface)) 

PLOT3D(MESH(Array(1..25, 1..25, 1..3, {(1, 1, 1) = 1.0, (1, 1, 2) =
 1.0, (1, 1, 3) = 1.0, (1, 2, 1) = .0, (1, 2, 2) = .0, (1, 2, 3) = .0, 
(1, 3, 1) = 3.75, (1, 3, 2) = 3.75, (1, 3, 3) = 3.75, (1, 4, 1... (13)
 

`:=`(P8, 
plot3d([a(theta), theta, z], theta = alpha .. beta, z = g(a(theta), 
theta) .. h(a(theta), theta), coords = cylindrical, style = surface)) 

PLOT3D(MESH(Array(1..25, 1..25, 1..3, {(1, 1, 1) = 1.0, (1, 1, 2) =
 1.0, (1, 1, 3) = 1.0, (1, 2, 1) = .0, (1, 2, 2) = .0, (1, 2, 3) = .0, 
(1, 3, 1) = .1, (1, 3, 2) = .1, (1, 3, 3) = .1, (1, 4, 1) = 1.... (14)
 

`:=`(P9, 
plot3d([b(theta), theta, z], theta = alpha .. beta, z = g(b(theta), 
theta) .. h(b(theta), theta), coords = cylindrical, style = surface)) 

PLOT3D(MESH(Array(1..25, 1..25, 1..3, {(1, 1, 1) = 4.0, (1, 1, 2) =
 4.0, (1, 1, 3) = 4.0, (1, 2, 1) = .0, (1, 2, 2) = .0, (1, 2, 3) = .0, 
(1, 3, 1) = 1.6, (1, 3, 2) = 1.6, (1, 3, 3) = 1.6, (1, 4, 1) =... (15)
 

`:=`(P10, plot3d([r, 
alpha, z], r = a(alpha) .. b(alpha), z = g(r, alpha) .. h(r, alpha), 
coords = cylindrical, style = surface)) 

PLOT3D(MESH(Array(1..25, 1..25, 1..3, {(1, 1, 1) = 1.0, (1, 1, 2) =
 1.0, (1, 1, 3) = 1.0, (1, 2, 1) = .0, (1, 2, 2) = .0, (1, 2, 3) = .0, 
(1, 3, 1) = .1, (1, 3, 2) = .1, (1, 3, 3) = .1, (1, 4, 1) = 1.... (16)
 

`:=`(P11, plot3d([r, 
beta, z], r = a(beta) .. b(beta), z = g(r, beta) .. h(r, beta), coords =
 cylindrical, style = surface)) 

PLOT3D(MESH(Array(1..25, 1..25, 1..3, {(1, 1, 1) = 
-0.4102067616e-9, (1, 1, 2) = -0.4102067616e-9, (1, 1, 3) = 
-0.4102067616e-9, (1, 2, 1) = 2.0, (1, 2, 2) = 2.0, (1, 2, 3) = 2.0, (1,
 3, 1) = .4, (1, ... (17)
 

 

 

 

display(P1, display(P1,
 P2, P3, P4, P5), display(P1, P2, P3, P4, P5, transparency = .3), 
display(P2, P3, P4, P5, P6, P7, transparency = .3), display(P6, P7, P8, 
P9, P10, P11), insequence = true, light...
display(P1, display(P1,
 P2, P3, P4, P5), display(P1, P2, P3, P4, P5, transparency = .3), 
display(P2, P3, P4, P5, P6, P7, transparency = .3), display(P6, P7, P8, 
P9, P10, P11), insequence = true, light...
 

Plot
 

display(P6, P7, P8, P9,
 P10, P11, lightmodel = light4) 

Plot
 

Vi regner ut masse, momenter og tyngdepunkt (antar massetetthet δ=1) 

 

`:=`(M, int(int(int(r, z
 = g(r, theta) .. h(r, theta)), r = a(theta) .. b(theta)), theta = alpha
 .. beta)) 

`+`(`-`(`/`(59, 60)), `*`(`/`(839, 120), `*`(Pi)), `*`(`/`(1, 2), 
`*`(`^`(Pi, 2)))) (18)
 

`:=`(Myz, 
int(int(int(`*`(`*`(r, `*`(cos(theta))), r), z = g(r, theta) .. h(r, 
theta)), r = a(theta) .. b(theta)), theta = alpha .. beta)) 

`+`(`/`(18937, 1800), `*`(`/`(3223, 320), `*`(Pi)), `*`(`/`(37, 
64), `*`(`^`(Pi, 2)))) (19)
 

`:=`(Mxz, 
int(int(int(`*`(`*`(r, `*`(sin(theta))), r), z = g(r, theta) .. h(r, 
theta)), r = a(theta) .. b(theta)), theta = alpha .. beta)) 

`+`(`/`(3791, 90), `*`(`/`(21, 320), `*`(Pi)), `-`(`*`(`/`(5, 64), 
`*`(`^`(Pi, 2))))) (20)
 

`:=`(Mxy, 
int(int(int(`*`(z, `*`(r)), z = g(r, theta) .. h(r, theta)), r = 
a(theta) .. b(theta)), theta = alpha .. beta)) 

`+`(`-`(`/`(473603, 54000)), `*`(`/`(13757, 900), `*`(Pi)), 
`*`(`/`(199, 96), `*`(`^`(Pi, 2))), `*`(`/`(1, 12), `*`(`^`(Pi, 3)))) (21)
 

`:=`(xx, `/`(`*`(Myz), 
`*`(M))) 

`/`(`*`(`+`(`/`(18937, 1800), `*`(`/`(3223, 320), `*`(Pi)), 
`*`(`/`(37, 64), `*`(`^`(Pi, 2))))), `*`(`+`(`-`(`/`(59, 60)), 
`*`(`/`(839, 120), `*`(Pi)), `*`(`/`(1, 2), `*`(`^`(Pi, 2)))))) (22)
 

 

1.8470 (23)
 

`:=`(yy, `/`(`*`(Mxz), 
`*`(M))) 

`/`(`*`(`+`(`/`(3791, 90), `*`(`/`(21, 320), `*`(Pi)), 
`-`(`*`(`/`(5, 64), `*`(`^`(Pi, 2)))))), `*`(`+`(`-`(`/`(59, 60)), 
`*`(`/`(839, 120), `*`(Pi)), `*`(`/`(1, 2), `*`(`^`(Pi, 2)))))) (24)
 

 

1.6035 (25)
 

`:=`(zz, `/`(`*`(Mxy), 
`*`(M))) 

`/`(`*`(`+`(`-`(`/`(473603, 54000)), `*`(`/`(13757, 900), `*`(Pi)),
 `*`(`/`(199, 96), `*`(`^`(Pi, 2))), `*`(`/`(1, 12), `*`(`^`(Pi, 3))))),
 `*`(`+`(`-`(`/`(59, 60)), `*`(`/`(839, 120), `*`(Pi)), `*`(`... (26)
 

 

2.4036 (27)
 

`:=`(c, .2) 

.2 (28)
 

`:=`(P12, 
implicitplot3d(`+`(`*`(`^`(`+`(x, `-`(xx)), 2)), `*`(`^`(`+`(y, 
`-`(yy)), 2)), `*`(`^`(`+`(z, `-`(zz)), 2))) = `*`(`^`(c, 2)), x = 
`+`(xx, `-`(c)) .. `+`(xx, c), y = `+`(yy, `-`(c)) .. `+`(y...
`:=`(P12, 
implicitplot3d(`+`(`*`(`^`(`+`(x, `-`(xx)), 2)), `*`(`^`(`+`(y, 
`-`(yy)), 2)), `*`(`^`(`+`(z, `-`(zz)), 2))) = `*`(`^`(c, 2)), x = 
`+`(xx, `-`(c)) .. `+`(xx, c), y = `+`(yy, `-`(c)) .. `+`(y...
 

PLOT3D(ISOSURFACE(Array(1..10, 1..10, 1..10, 1..4, {(1, 1, 1, 1) = 
1.64701886982864, (1, 1, 1, 2) = 1.64701886982864, (1, 1, 1, 3) = 
1.64701886982864, (1, 1, 1, 4) = 1.64701886982864, (1, 1, 2, 1) = 1... (29)
 

`:=`(P13, display(P6, 
P7, P8, P9, P10, P11, transparency = .5, lightmodel = light4)) 

PLOT3D(MESH(Array(1..25, 1..25, 1..3, {(1, 1, 1) = 1.0, (1, 1, 2) =
 1.0, (1, 1, 3) = 1.0, (1, 2, 1) = .0, (1, 2, 2) = .0, (1, 2, 3) = .0, 
(1, 3, 1) = .1, (1, 3, 2) = .1, (1, 3, 3) = .1, (1, 4, 1) = 1.... (30)
 

Tegner legemet sammen med en rød kuleflate sentrert i tyngdepunktet 

 

display(P12, P13) 

Plot