Re: [问题] 请问圆柱座标下向量绘图

楼主: ginstein (迈向学术之路)   2016-10-18 21:43:17
※ 引述《silverywings (puss)》之铭言:
: 一向量 cos(2θ) êr - r êθ +z êz
: 请问要怎么画出来
若问题是将柱坐标向量 cos(2θ) ê_r - r ê_θ +z ê_z 以直角坐标表示,
可用 CoordinateTransform 指令进行转换。
例如 CoordinateTransform["Cylindrical" -> "Cartesian", {r, θ, z}]
将柱座标 {r, θ, z} 转换成 {r Cos[θ], r Sin[θ], z}。
以下程式以 Manipulate 显示各种柱座标 {r, θ, z} 下的直角坐标向量。
origin = {0, 0, 0};
InsetShift = {0, 0, .1};
Manipulate[
vector$Cylind = {Cos[2θ], -r, z};
vector =
CoordinateTransform["Cylindrical" -> "Cartesian", vector$Cylind];
Graphics3D[
{PointSize@Large, Point@origin, Arrow@{origin, vector},
Inset[N@vector, vector + InsetShift]},
Axes -> True,
AxesLabel -> {"x", "y", "z"},
ImageSize -> 280,
PlotRange -> {{-1, 1}, {-1, 1}, {-1, 1}},
ViewPoint -> {2.2, -2.3, 1.2}, ViewVertical -> {0.18, -0.18, 1}],
{{r, 0}, -Pi, Round[Pi, 10^-8], Appearance -> "Labeled"},
{{θ, 0}, -Pi/4, Pi/4, Appearance -> "Labeled"},
{{z, 0}, -1, 1, Appearance -> "Labeled"}]

Links booklink

Contact Us: admin [ a t ] ucptt.com