# Simple interpolation?

**URL:** https://discourse.julialang.org/t/simple-interpolation/55320
**Category:** General Usage
**Tags:** interpolations
**Created:** [February 15, 2021, 2:10pm UTC](https://discourse.julialang.org/t/simple-interpolation/55320 "2021-02-15T14:10:48Z")
**Posts on this page:** 1
**Showing post:** 14

<div class="post-metadata">

### Author: ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)
#### Post date: [February 15, 2021, 7:42pm UTC](https://discourse.julialang.org/t/simple-interpolation/55320/14 "2021-02-15T19:42:19Z")

</div>

@dpsanders, in that situation Paul Dierckx is our friend:

```julia
using Dierckx, Plots
t = 0.05:.2:0.95; rt = rand(length(t));
x, y = 2sin.(π*t) .+ 0.3rt, cos.(π*t) .+ 0.2rt
spl = ParametricSpline(t, [x y]', bc="extrapolate", s = 0.1)
tfine = 0:.01:1
xys = evaluate(spl,tfine);
xy0 = evaluate(spl, 0.5) # interpolate point at t=0.5
plot(xys[1,:], xys[2,:], aspect_ratio=1, label="Dierckx.jl parametric spline", title="Dierckx parametric spline")
scatter!(x, y, label="input points", xlimits = (-1.5,2.5))
scatter!([xy0[1]], [xy0[2]], ms=5, mc=:red, label="Interpolated", legend=:bottomleft) 

```

![Dierckx_parametric_spline](https://global.discourse-cdn.com/julialang/original/3X/a/3/a39acbf92d3a50a9701676d67763001ff4c0efe7.png)

---

_[View the full topic](https://discourse.julialang.org/t/simple-interpolation/55320)._
