Hello
How might I apply Scale[] to a RevolutionPlot3D[] and a ParametricPlot3D?
e.g. plots,
RevolutionPlot3D[{2 + Cos[t], Sin[t]}, {t, 0, 2 Pi}]
ParametricPlot3D[{Cos[u], Cos[u] - Cos[v], Sin[v]}, {u, 3, 2 \[Pi]}, {v, -2, \[Pi]}]
{scaleX, scaleY, scaleZ} = {1, 1, 1};
Graphics3D[{Scale[
Sphere[{0, 0, 0}, 0.333], {scaleX, scaleY, scaleZ}]}, PlotRange -> {{-1, 1}, {-1, 1}, {-1, 1}}]
Any help appreciated!
Greg
nma
(Nasser M. Abbasi)
2
Use Scale. To get the Graphics to work, use First@, like this
g0 = ParametricPlot3D[{Cos[u], Cos[u] - Cos[v], Sin[v]}, {u, 3, 2 \[Pi]}, {v, -2, \[Pi]}, Axes -> True];
g1 = Graphics3D[Scale[First@g, {10, 1, 1}], Axes -> True];
Grid[{{"before scaling", "after scaling"},{g0, g1}}]
Much thanks. It looks like you dropped a character pasting your reply. Am adding it here or others’ benefit.
g0 = ParametricPlot3D[{Cos[u], Cos[u] - Cos[v], Sin[v]}, {u, 3, 2 \[Pi]}, {v, -2, \[Pi]}, Axes -> True];
g1 = Graphics3D[Scale[First@g0, {10, 1, 1}], Axes -> True];
Grid[{{"before scaling", "after scaling"}, {g0, g1}}]
& as applied to RevolutionPlot3D (no difference)
& with a scalar acting on the whole object equally
scalar = 5;
plot1 = RevolutionPlot3D[{2 + Cos[t], Sin[t]}, {t, 0, 2 Pi}]
plot2 = Graphics3D[Scale[First@plot1, {scalar, scalar, scalar}], Axes -> True]
Have everything I need now. Thanks for the help!