Message Boards Message Boards

0
|
4431 Views
|
3 Replies
|
1 Total Likes
View groups...
Share
Share this post:
GROUPS:

Apply Scale[] to RevolutionPlot3D[] and ParametricPlot3D

Posted 10 years ago

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

POSTED BY: Greg
3 Replies
Posted 10 years ago

& 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!

POSTED BY: Greg

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}}]

enter image description here

POSTED BY: Nasser M. Abbasi
Posted 10 years ago

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}}]
POSTED BY: Greg
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract