# \[Solved\] Combine dynamic scaling and rotation transforms

**URL:** <https://community.wolfram.com/t/solved-combine-dynamic-scaling-and-rotation-transforms/21971>\
**Category:** Questions\
**Tags:** equation-solving, geometry, graphics-and-visualization, interface-construction\
**Created:** [April 23, 2023, 7:44pm UTC](https://community.wolfram.com/t/solved-combine-dynamic-scaling-and-rotation-transforms/21971 "2023-04-23T19:44:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![webauct](https://avatars.discourse-cdn.com/v4/letter/w/c89c15/32.png) [@webauct](https://community.wolfram.com/u/webauct)\
**Post date:** [April 23, 2023, 7:44pm UTC](https://community.wolfram.com/t/solved-combine-dynamic-scaling-and-rotation-transforms/21971/1 "2023-04-23T19:44:52Z")

</div>

Hello

In the `Manipulate` code below I want for the inner tetrahedron to change its scale and its orientation.

OK for the first transform but not for the second one.

I put in comments the path I tried in order to modify the orientation but it is a dead-end, MMA gets stuck and difficult to abort.

I feel that the solution must lie in combining the two transformation function matrices but how to do it eludes me.  
Thanks

```
ClearAll["Global`*"]
Manipulate[tet = PolyhedronData["Tetrahedron", "GraphicsComplex"];
 sc = ScalingTransform[    
     (* Upper and Lower limits of scale reduction *)
   RootReduce[  
     coeff PolyhedronData["Tetrahedron", "Inradius"] /  
       PolyhedronData["Tetrahedron", "Circumradius"]] {1, 1, 1}];

    gr = Graphics3D[{Green, 
    MapAt[sc, tet, 
     1]}]; (* \
gr1=Graphics3D[GeometricTransformation[{Opacity[0.4,Yellow], gr ??? \
},RotationTransform[teta,{x,y,z}]]]; *)
 Show[{Graphics3D[{Opacity[0.4, Yellow], tet}, Boxed -> False]}, 
  gr (*, gr1 ? *)], {{coeff, 1}, 1, 3, 0.1}, 
 Row[{Control[{x, {0, 1}, ControlType -> Checkbox}], Spacer[20], 
   Control[{y, {1, 0}, ControlType -> Checkbox}], Spacer[20], 
   Control[{z, {0, 1}, ControlType -> Checkbox}]}], {{teta, 0}, 0, 
  Pi}]

```

---

<div class="post-metadata">

**Author:** ![humanbirthtillendofearth](https://avatars.discourse-cdn.com/v4/letter/h/6de8d8/32.png) [@humanbirthtillendofearth](https://community.wolfram.com/u/humanbirthtillendofearth)\
**Post date:** [April 24, 2023, 3:37pm UTC](https://community.wolfram.com/t/solved-combine-dynamic-scaling-and-rotation-transforms/21971/2 "2023-04-24T15:37:31Z")

</div>

(\* Scaling works for me removed comment and retyped\*)  
[https://www.wolframcloud.com/download/humanbirthtillendofearth/Published/test1.nb](https://www.wolframcloud.com/download/humanbirthtillendofearth/Published/test1.nb)

---

<div class="post-metadata">

**Author:** ![humanbirthtillendofearth](https://avatars.discourse-cdn.com/v4/letter/h/6de8d8/32.png) [@humanbirthtillendofearth](https://community.wolfram.com/u/humanbirthtillendofearth)\
**Post date:** [April 24, 2023, 5:18pm UTC](https://community.wolfram.com/t/solved-combine-dynamic-scaling-and-rotation-transforms/21971/3 "2023-04-24T17:18:39Z")

</div>

ClearAll["Global`_"]  
Manipulate[  
tet = PolyhedronData[“Tetrahedron”, “GraphicsComplex”];  
sc = ScalingTransform[  
(_ Upper and Lower limits of scale reduction \*)  
RootReduce[  
coeff PolyhedronData[“Tetrahedron”, “Inradius”] /  
PolyhedronData[“Tetrahedron”, “Circumradius”]] {1, 1, 1}];  
gr = Graphics3D[{Green,  
MapAt[sc, tet,  
1]}];

```
  (*Added [[1]] first element*) 
  
gr1=Graphics3D[GeometricTransformation[{Opacity[0.4,Yellow], gr[[1]] },RotationTransform[teta,{x,y,z}]]]; 
 Show[{Graphics3D[{Opacity[0.4, Yellow], tet}, Boxed -> False]}, 
  gr ,gr1], {{coeff, 1}, 1, 3, 0.1}, 
 Row[{Control[{x, {0, 1}, ControlType -> Checkbox}], Spacer[20], 
   Control[{y, {1, 0}, ControlType -> Checkbox}], Spacer[20], 
   Control[{z, {0, 1}, ControlType -> Checkbox}]}], {{teta, 0}, 0, 
  Pi}
]

```

---

<div class="post-metadata">

**Author:** ![webauct](https://avatars.discourse-cdn.com/v4/letter/w/c89c15/32.png) [@webauct](https://community.wolfram.com/u/webauct)\
**Post date:** [April 25, 2023, 11:40am UTC](https://community.wolfram.com/t/solved-combine-dynamic-scaling-and-rotation-transforms/21971/4 "2023-04-25T11:40:52Z")

</div>

Yes indeed ! You had a sharper eye than mine for spotting the small mistake that blocked my code..A great thanks!
