# Orthographic path traveling

**URL:** <https://discourse.processing.org/t/orthographic-path-traveling/11786>\
**Category:** Coding Questions\
**Created:** [June 2, 2019, 8:25pm UTC](https://discourse.processing.org/t/orthographic-path-traveling/11786 "2019-06-02T20:25:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![8BitRift](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/8bitrift/32/3495_2.png) [@8BitRift](https://discourse.processing.org/u/8BitRift)\
**Post date:** [June 2, 2019, 8:25pm UTC](https://discourse.processing.org/t/orthographic-path-traveling/11786/1 "2019-06-02T20:25:04Z")

</div>

So I am trying to use the camera function and the orthographic view to travel down a path I have managed to get it to work with perspective but I cant get it to work properly with the orthographic view. Below is the code:

```auto
void setup(){
  size(800,800,P3D);
  ortho(-width/2, width/2, -height/2, height/2,1,1000);
  //ortho();
  //perspective(PI/3.0, float(width)/float(height),1,1000);
  frameRate(60);
}

void draw(){
  background(0);
  camera(0,-10,200-frameCount,0,0,0-frameCount,0,0,1);
  fill(255,0,0);
  ellipse(0,-20,10,10);
  beginShape();
  vertex(-10,0,-400);
  vertex(10,0,-400);
  vertex(10,0,100);
  vertex(-10,0,100);
  endShape();
  fill(0,255,0);
  beginShape();
  vertex(-10,0,100);
  vertex(10,0,100);
  vertex(10,0,800);
  vertex(-10,0,800);
  endShape();
}

```

To get an idea of what i want it to do uncomment the perspective line and run it, but in orthographic there must be some clipping issue i am having because even though there is no depth the green part of the path should still extend to the bottom of the screen, not be clipped away.

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [June 5, 2019, 6:33pm UTC](https://discourse.processing.org/t/orthographic-path-traveling/11786/2 "2019-06-05T18:33:11Z")

</div>

Have you tried manipulating the near and far arguments to ortho – in particular, near? Those should control clipping.

[https://processing.org/reference/ortho\_.html](https://processing.org/reference/ortho_.html)

---

<div class="post-metadata">

**Author:** ![8BitRift](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/8bitrift/32/3495_2.png) [@8BitRift](https://discourse.processing.org/u/8BitRift)\
**Post date:** [June 6, 2019, 9:26pm UTC](https://discourse.processing.org/t/orthographic-path-traveling/11786/3 "2019-06-06T21:26:15Z")

</div>

Yes I have, If you know how to fix it and can post the code I would appreciate it, because I have spent hours messing around every which way with the ortho parameters trying to get it to work but no matter what I do it doesn’t seem to fix the near clipping issue.
