# Points on a line

**URL:** <https://discourse.processing.org/t/points-on-a-line/17977>\
**Category:** Project Guidance\
**Created:** [February 21, 2020, 4:09pm UTC](https://discourse.processing.org/t/points-on-a-line/17977 "2020-02-21T16:09:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![richardh](https://avatars.discourse-cdn.com/v4/letter/r/9de0a6/32.png) [@richardh](https://discourse.processing.org/u/richardh)\
**Post date:** [February 21, 2020, 4:09pm UTC](https://discourse.processing.org/t/points-on-a-line/17977/1 "2020-02-21T16:09:10Z")

</div>

I was looking for help with the following problem; draw a line between two points, along that line place points on it at various % (i.e. place a point every 15% of the line length). place text next to each point with the % value.

thanks in advance for any assistance.

---

<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:** [February 21, 2020, 4:21pm UTC](https://discourse.processing.org/t/points-on-a-line/17977/2 "2020-02-21T16:21:31Z")

</div>

Hello,

Welcome to the forum.

I would start by exploring the resources at the Processing website:  
[https://processing.org/](https://processing.org/)

Take a look at the references; line() and point() come to mind and also for().

Once you have worked through some of the examples consider how you would plot a point at 15% along the line; that can be simplified to 15% along x and 15% along y from the starting point.  
Think about how you would do this on a piece of graph paper and translate that to code.

Once you have made a sincere effort ask for help.  
This is very achievable for a beginner (assumed) and a great exercise; I worked through this and encourage you to as well.

`:)`

![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/7/7d1aabab0e49cc239ecca9960251ce91e09f3722.png)

---

<div class="post-metadata">

**Author:** ![richardh](https://avatars.discourse-cdn.com/v4/letter/r/9de0a6/32.png) [@richardh](https://discourse.processing.org/u/richardh)\
**Post date:** [February 21, 2020, 4:55pm UTC](https://discourse.processing.org/t/points-on-a-line/17977/3 "2020-02-21T16:55:45Z")

</div>

thanks! I’ll start this an let you know the results. I appreciate the push in the correct direction. 🙂

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [February 22, 2020, 3:44pm UTC](https://discourse.processing.org/t/points-on-a-line/17977/4 "2020-02-22T15:44:03Z")

</div>

also look at lerp() please
