0
$\begingroup$

I plotted a bunch of regions using RegionPlot3D, and would need to rotate them around an a vector {0,0,1} anchored at point {5,5,5}. I tried RotationTransform, Transformed Region, and changing variables yet nothing seems to work. Any idea?

  a=-1 ; b=-1 ; c=-1 ; r=3 ;
  equationsphere=(x-a)^2+(y-b)^2+(z-c)^2-r^2;
  sphere = RegionPlot3D[equationsphere <= 0, {x, -10, 10}, {y, -10, 10}, {z, -10, 10}, AxesOrigin -> {0, 0, 0}, AxesLabel->{x,y,z}, ImageSize -> {800, 800}, PlotRange -> {{-10, 10}, {-10, 10}, {-10, 10}},PlotPoints->50]
  spheresubshape1 = RegionPlot3D[equationsphere <= 0, {x, 0, 10}, {y, 0, 10}, {z, 0, 10}, AxesOrigin -> {0, 0, 0}, ImageSize -> {800, 800}, PlotRange -> {{-10, 10}, {-10, 10}, {-10, 10}},PlotPoints->50];

I'd like to rotate spheresubshape1 from {0,0,0} to {10,0,0}, so Pi/2 around the vector {0,0,1} anchored at point {5,5,5}.

Any idea on how I can do this? Please that would be super helpful

$\endgroup$
1
  • 1
    $\begingroup$ This should help: 100025 or 32468 $\endgroup$
    – Kuba
    Nov 23, 2017 at 12:53

1 Answer 1

1
$\begingroup$

Something like this?:

Show[Graphics3D[
GeometricTransformation[spheresubshape1[[1]], 
RotationTransform[Pi/2, {0, 0, 1}, {5, 5, 5}]]], AxesOrigin -> {0, 0, 0}, 
ImageSize -> {800, 800}, PlotRange -> {{-10, 10}, {-10, 10}, {-10, 10}}, Axes -> True]

enter image description here

$\endgroup$
1
  • $\begingroup$ You're a boss! Thank you $\endgroup$
    – Wolf1993
    Nov 24, 2017 at 1:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.