shuyuehua 发表于 2010-3-17 22:33:52

图形的组合

请问如何将画好的图形整合在一起
还有 将画好的图形做90度旋转怎么弄啊
请各位大虾帮帮忙

mathfan2008 发表于 2010-3-18 09:19:46

方法有多种:
1. 鼠标操作:对于多个已经画好的图形,如果想要要在同一个图形上显示所有的图形,用鼠标点击图形,按住Ctrl键,然后直接用鼠标拖。Ctrl键的作用是复制,如果不按Ctrl键,就是剪切图形。

2. 用命令实现图形的显示与合并:
见帮助 ?plots

with(plots):
g1 := plot(cos(x), x = -2*Pi .. 2*Pi):
g2 := plot(sin(x), x = -2*Pi .. 2*Pi, thickness = 5):
display(g1, g2, axes = BOXED);


g3 := plot3d(2*exp(-sqrt(x^2+y^2)), x = -6 .. 6, y = -6 .. 6):
g4 := plot3d(sin(sqrt(x^2+y^2)), x = -6 .. 6, y = -6 .. 6):
display(g3, g4);

mathfan2008 发表于 2010-3-18 09:33:30

旋转图形:

1. ImageTools - rotate an image in increments of 90 degrees

例子:
> img := Create(100, 200, proc (r, c) options operator, arrow; .5+evalf(exp(-(1/50)*c)*.5*sin((1/20)*r)) end proc)
> img1 := Rotate(img, 90)
> img2 := Rotate(img, 180)
> img3 := Rotate(img, 270)
> View(, )

2. plottools - rotate PLOT and PLOT3D data structures

> with(plottools)
> with(plots)
> p := plot()
> r := rotate(p, (1/3)*Pi)
> display(p, r)




3. 三维图形,直接用鼠标操作就可以。
页: [1]
查看完整版本: 图形的组合