# Improve this flying graph using GeometricTransformation?

**URL:** <https://community.wolfram.com/t/improve-this-flying-graph-using-geometrictransformation/8482>\
**Category:** Ideas\
**Tags:** optics, geometry, graphics-and-visualization\
**Created:** [May 3, 2016, 7:37am UTC](https://community.wolfram.com/t/improve-this-flying-graph-using-geometrictransformation/8482 "2016-05-03T07:37:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![michiel](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/michiel/32/28118_2.png) [@michiel](https://community.wolfram.com/u/michiel)\
**Post date:** [May 3, 2016, 7:37am UTC](https://community.wolfram.com/t/improve-this-flying-graph-using-geometrictransformation/8482/1 "2016-05-03T07:37:35Z")

</div>

It was a small experiment for getting a better understanding using rotationtransform. Below I show you mine result.

```
data = Flatten[Table[{x, y, x^2 - y^2}, {x, -3, 3}, {y, -3, 3}], 1];

FG = Table[
  MapAt[GeometricTransformation[#, 
     RotationTransform[t Pi/8, {0, 0, 1}]] &, 
   ListPlot3D[data /. {x_, y_, z_} -> {x, y, z*t}, 
    PlotRange -> {{-6, 6}, {-6, 6}, {-65, 65}}, Boxed -> False, 
    PlotStyle -> Directive[Opacity[.5], Green], Mesh -> 5, 
    MeshStyle -> White, AxesOrigin -> {0, 0, 0}, ImageSize -> 800, 
    PlotLabel -> "Flying Graph", 
    Lighting -> {{"Directional", Green, {{0, 0, 10}, {0, 0, 0}}}}, 
    ViewPoint -> {10, -2, 1}], {1}], {t, -8, 8, 1}]

```

![FlyingGraph.GIF](https://global.discourse-cdn.com/wolfram/original/2X/b/b6f95d9c1c4c0cdd20b686fe3ea06e01a26e9d93.gif)

```
Export["FlyingGraph.GIF", FG, "DisplayDurations" -> 1];

```

Do you have suggestions for improvement?

---

<div class="post-metadata">

**Author:** ![bgoodman11](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/bgoodman11/32/23878_2.png) [@bgoodman11](https://community.wolfram.com/u/bgoodman11)\
**Post date:** [May 3, 2016, 11:11pm UTC](https://community.wolfram.com/t/improve-this-flying-graph-using-geometrictransformation/8482/2 "2016-05-03T23:11:15Z")

</div>

Hi,

The surface you’re working with and the methods you’re investigating are really interesting topics. General suggestions I can think of:

You could experiment with different methods of generating the hyperbolic paraboloid,

```
splineHypar[a_, b_] := Array[{(*x*)#1,(*y*)#2,(*z*)#2^2/b^2 - #1^2/a^2} &, {3,(*refinement*)20}, {{-3, 3}, {-3, 3}}];
Graphics3D[{Opacity[0.5], BSplineSurface[splineHypar[1, 1]]}, Boxed -> False]

```

 ![plot.PNG](https://global.discourse-cdn.com/wolfram/original/2X/e/ec8176c4cf18220c7b4d9f3a4704224a159dc641.png)

Use `Manipulate` to play with the surface and the rotation parameter

```
Manipulate[
 GeometricTransformation[#, 
    RotationTransform[\[Theta], {0, 0, 1}]] & /@ 
  Graphics3D[{Opacity[0.5], 
    BSplineSurface[
     splineHypar[a, b]]}], {\[Theta], -\[Pi], \[Pi], \[Pi]/20}, {a, 1,
   2, 0.05}, {b(*a*), 1, 2, 0.05}]

```

![hyparManip.gif](https://global.discourse-cdn.com/wolfram/original/2X/8/8f954104ae9a141f3a279b9c5beb59412b4a61c0.gif)

If you want to do more things with Geometric/Rotation Transform, try combining multiple graphic objects,

```
Manipulate[
 Show[{
   (*car=*)Graphics[{
       EdgeForm[Thick], White,
       GeometricTransformation[
        Rectangle[{#1, #2 - (#4 1)}, {#1 + (#4 3), #2 + (#4 1)}], 
        RotationTransform[#3, {#1 + (#4 1.5), #2}]],
       GeometricTransformation[
        Triangle[{{#1 + (#4 2), #2 + (#4 1)}, {#1 + (#4 2), #2 - (#4 \
1)}, {#1 + (#4 3), #2 }}], RotationTransform[#3, {#1 + (#4 1.5), #2}]]
       }] &[p[[1]], p[[2]], \[Theta], 5],
   RegionPlot@
      TransformedRegion[
       Polygon[{{p[[1]] + 15, p[[2]] - 5}, {p[[1]] + 15, 
          p[[2]] + 5}, {p[[1]] + 15 + #1, 
          p[[2]] + 5 + (#1/#2)}, {p[[1]] + 15 + #1, 
          p[[2]] - 5 - (#1/#2)}}], 
       RotationTransform[\[Theta], {p[[1]] + (15/2), p[[2]]}]] &[30, 
    10]
   }, Axes -> True, PlotRange -> {{-50, 50}, {-50, 50}}],
 {{\[Theta], 0, \[Theta]}, -\[Pi], \[Pi]}
 ]

```

![rotate.gif](https://global.discourse-cdn.com/wolfram/original/3X/1/0/10b093d00b395c45d49259739f0cdb7be218d84f.gif)

Hope this helps,

Ben
