# Hi guys why my text doesn't show?

**URL:** <https://discourse.processing.org/t/hi-guys-why-my-text-doesnt-show/10075>\
**Category:** Coding Questions\
**Created:** [April 8, 2019, 8:55am UTC](https://discourse.processing.org/t/hi-guys-why-my-text-doesnt-show/10075 "2019-04-08T08:55:44Z")\
**Posts on this page:** 1\
**Showing post:** 14

<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:** [April 12, 2019, 4:01pm UTC](https://discourse.processing.org/t/hi-guys-why-my-text-doesnt-show/10075/14 "2019-04-12T16:01:50Z")

</div>

Regarding the initial moving-along-a-path question, one general approach is a list-based interpolation.

> [@PVectors, traveling a path](https://discourse.processing.org/t/pvectors-traveling-a-path/4887/4):
>
> [http://s000.tinyupload.com/index.php?file\_id=03543518300275721849](http://s000.tinyupload.com/index.php?file_id=03543518300275721849)

- [List-based interpolations - Processing 2.x and 3.x Forum](https://forum.processing.org/two/discussion/25310/list-based-interpolations)

Here is an example. In setup, a path made of points is defined. In draw, the current path location is computed based on the clock. Then that location (0-1) is passed to the lerpVectors function to find the current point along the path.

```auto
// LerpVectorsSimplified
// 2019-04 Processing 3.4 - based on LerpVectorsExample by Jeremy Douglass
PVector vecs[];
PVector loc;

void setup() {
  size(200, 200);
  // mark path points
  vecs = new PVector[4];
  vecs[0] = new PVector(10, 10);
  vecs[1] = new PVector(width-10, 10);
  vecs[2] = new PVector(width-10, height-10);
  vecs[3] = new PVector(10, height-10);
  stroke(255,0,0);
  fill(0,0,255);
} 
 
void draw() {
  background(255);
  int time = millis()%4000; // a clock that counts up to 4000 and starts over
  float sawtoothWave = map(time, 0, 3999, -1, 1); // from -1 to 1, then starts over
  float triangleWave = abs(sawtoothWave); // bounces 0-1-0-1-0
  loc = lerpVectors(triangleWave, vecs); // find our location in 2D path based on 0-1
  ellipse(loc.x, loc.y, 50, 50); // draw at the location
}
  
// based on an amount, find the location along a path made of points
PVector lerpVectors(float amt, PVector... vecs) {
  if(vecs.length==1){ return vecs[0]; }
  float cunit = 1.0/(vecs.length-1);
  return PVector.lerp(vecs[floor(amt / cunit)], vecs[ceil(amt / cunit)], amt%cunit/cunit);
}

```

---

_[View the full topic](https://discourse.processing.org/t/hi-guys-why-my-text-doesnt-show/10075)._
