# Discreet data interpolation

**URL:** https://discourse.processing.org/t/discreet-data-interpolation/26118
**Category:** Coding Questions
**Created:** [December 10, 2020, 2:18pm UTC](https://discourse.processing.org/t/discreet-data-interpolation/26118 "2020-12-10T14:18:12Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![SurfWise](https://avatars.discourse-cdn.com/v4/letter/s/58956e/32.png) [@SurfWise](https://discourse.processing.org/u/SurfWise)
#### Post date: [December 10, 2020, 2:18pm UTC](https://discourse.processing.org/t/discreet-data-interpolation/26118/1 "2020-12-10T14:18:12Z")

</div>

Hello everyone! I struggle to solve one problem. I have discreet set of data of 2 functions C\_L(alpha) and C\_D(alpha) - lift coefficient and drag coefficient depending on angle of attack alpha. The set looks as follows:

ALPHA\_CL = [-180.0, -160.0, -90.0, -20.0, -10.0, -5.0, 0.0, 20.0, 40.0, 90.0, 160.0, 180.0]  
CL\_LIST = [0.0, 0.5, 0.0, 0.08, 0.125, 0.15, 0.2, 1.0, 1.0, 0.0, -0.5, 0.0]

ALPHA\_CD = [-180.0, -170.0, -140.0, -90.0, -20.0, 0.0, 20.0, 90.0, 140.0, 170.0, 180.0]  
CD\_LIST = [0.5, 0.5, 0.5, 1.0, 0.2, 0.1, 0.2, 1.0, 0.5, 0.5, 0.5]

I need those coefficients to calculate lift and drag force acting on kite.  
F\_L= 0.5 \* rho \* pow(v,2) \* C\_L(alpha)

How can I interpolate these sets of data so that when I calculate alpha angle - I can precisely determine C\_L and D\_L coefficients.

thank You for help

---

<div class="post-metadata">

### Author: ![Divitiacus](https://avatars.discourse-cdn.com/v4/letter/d/848f3c/32.png) [@Divitiacus](https://discourse.processing.org/u/Divitiacus)
#### Post date: [December 10, 2020, 7:17pm UTC](https://discourse.processing.org/t/discreet-data-interpolation/26118/2 "2020-12-10T19:17:11Z")

</div>

I assume that you mean, that you need the interpolation between the discreet values to calculate for any value?

In this article about noise several methods to interpolate discreet values are shown, linear, cosine, cubic interpolation and smoothing. That might work for your values as well:

> **[Perlin Noise](https://web.archive.org/web/20080724063449/http://freespace.virgin.net/hugo.elias/models/m_perlin.htm)**

---

<div class="post-metadata">

### Author: ![SurfWise](https://avatars.discourse-cdn.com/v4/letter/s/58956e/32.png) [@SurfWise](https://discourse.processing.org/u/SurfWise)
#### Post date: [December 12, 2020, 2:26pm UTC](https://discourse.processing.org/t/discreet-data-interpolation/26118/3 "2020-12-12T14:26:41Z")

</div>

Thank You! that’s exactly what I needed!
