# Flipcard (based on Topics/Textures/TextureQuad example) Front and Back

**URL:** <https://discourse.processing.org/t/flipcard-based-on-topics-textures-texturequad-example-front-and-back/37024>\
**Category:** Beginners\
**Created:** [May 22, 2022, 8:08pm UTC](https://discourse.processing.org/t/flipcard-based-on-topics-textures-texturequad-example-front-and-back/37024 "2022-05-22T20:08:30Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [May 22, 2022, 9:59pm UTC](https://discourse.processing.org/t/flipcard-based-on-topics-textures-texturequad-example-front-and-back/37024/3 "2022-05-22T21:59:43Z")

</div>

Hello @Gus_Fermin ,

I have also grappled with this before but ended up simplifying my approach.

You can do this for simple rotations about the Y:

```auto
void draw() {
  background(0);
  translate(width / 2, height / 2, -5);
  float startAngle = -TAU/4;
  float angle = (frameCount%720)*TAU/720;
  float angle2 = startAngle+angle;
  rotateY(angle2);
  //fill(#0768ED);
  //circle(150, 100, 50);
  if (angle2 > -TAU/4 && angle2 < TAU/4)
    shape(quadIN, 0, 0);
  else
    shape(quadOUT, 0, 0);
  }

```

I did this for this example:  
_[OpenTrack UDP Data Tracking](https://discourse.processing.org/t/opentrack-udp-data-tracking/29115)_

More complex rotations may be problematic.

UPDATE:  
I see that you sorted this out already!

`:)`

---

_[View the full topic](https://discourse.processing.org/t/flipcard-based-on-topics-textures-texturequad-example-front-and-back/37024)._
