# Ellipse/circle clipping mask in 3d text output

**URL:** https://discourse.processing.org/t/ellipse-circle-clipping-mask-in-3d-text-output/16193
**Category:** Coding Questions
**Created:** [December 7, 2019, 12:38am UTC](https://discourse.processing.org/t/ellipse-circle-clipping-mask-in-3d-text-output/16193 "2019-12-07T00:38:53Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![add02one](https://avatars.discourse-cdn.com/v4/letter/a/50afbb/32.png) [@add02one](https://discourse.processing.org/u/add02one)
#### Post date: [December 7, 2019, 12:38am UTC](https://discourse.processing.org/t/ellipse-circle-clipping-mask-in-3d-text-output/16193/1 "2019-12-07T00:38:53Z")

</div>

hi, I’m working on a project where text is output in 3d renderer rotating around various axis and moving across. Below is the simplified version. It uses rectangular mask through clip(), but i can’t find a way to make it circular as if i look at the screen through a hole.

Anyone came across something like that before?  
Thanks in advance!

```auto
void setup() {
  size(300, 300, P3D);                         
  fill(300, 300, 0);
  textAlign(LEFT, CENTER);
  background(0);
}  

float x = 12;
float y = 45;

void draw() { 
  background(0);
  textSize(56);
  fill(0, 102, 153, 500);
  
  pushMatrix();
     rotateY(radians(30));
     clip(10,10,200,100);
     text("word", x, y);
    x += 1;
  popMatrix();

   clip(0, 0, width, height);
}

```

---

<div class="post-metadata">

### Author: ![kfrajer](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kfrajer/32/196_2.png) [@kfrajer](https://discourse.processing.org/u/kfrajer)
#### Post date: [December 8, 2019, 5:21am UTC](https://discourse.processing.org/t/ellipse-circle-clipping-mask-in-3d-text-output/16193/2 "2019-12-08T05:21:28Z")

</div>

Clip is very limited as you found out. I suggest you check the following posts. They could be used in 3D as well after some tweaking:

- [https://forum.processing.org/two/discussion/23886/masking-a-shape-with-another-shape%20%20%20](https://forum.processing.org/two/discussion/23886/masking-a-shape-with-another-shape%20%20%20)
- [https://forum.processing.org/two/discussion/27757/can-i-create-a-mask-from-a-shape%20%20](https://forum.processing.org/two/discussion/27757/can-i-create-a-mask-from-a-shape%20%20)
- [https://forum.processing.org/two/discussion/20868/use-masks-to-clip](https://forum.processing.org/two/discussion/20868/use-masks-to-clip)

Kf
