# Gradient interpolation with 3+ points

**URL:** <https://discourse.processing.org/t/gradient-interpolation-with-3-points/32832>\
**Category:** Coding Questions\
**Created:** [October 14, 2021, 4:42pm UTC](https://discourse.processing.org/t/gradient-interpolation-with-3-points/32832 "2021-10-14T16:42:26Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![hamoid](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/hamoid/32/58_2.png) [@hamoid](https://discourse.processing.org/u/hamoid)\
**Post date:** [October 18, 2021, 11:14am UTC](https://discourse.processing.org/t/gradient-interpolation-with-3-points/32832/7 "2021-10-18T11:14:09Z")

</div>

Related:

> [@HELP. How can I intersect three colors from these ellipses?](https://discourse.processing.org/t/help-how-can-i-intersect-three-colors-from-these-ellipses/22500/4):
>
> Hi @johncusack slight_smile Welcome to the forum! Anything that has to do with gradients is a great fit for shaders, unfortunately writing GLSL is not very beginner friendly. Based on [Is there a better way to draw gradient colored ellipse?](https://discourse.processing.org/t/is-there-a-better-way-to-draw-gradient-colored-ellipse/22220/4) I wrote a 3 point gradient which might look like this: PShader gradient; PShape shp; int[][] coordinate = { {0, 150}, {100, 450}, {200, 500}, {150, 750}, {400, 850}, {500, 750}, {450, 450}, {500, 100}, {175, 0} }; void setup() { size(600, 1000, P3D…

---

_[View the full topic](https://discourse.processing.org/t/gradient-interpolation-with-3-points/32832)._
