Any lips images

Python 3 + numpy + pylab, 168 163 156 bytes

import numpy,pylab
f,t=eval(input())
s=max(map(abs,sum(f,())))+t
k=numpy.r_[-s:s+1]
pylab.imsave('a.png',sum(((k-x)**2+(k[:,None]-y)**2)**.5for x,y in f)>t)

Outputs to a file called a.png, the y-axis increases downwards.

Sample outputs (click for full-res versions)

[(5, 8)], 100:

enter image description here

[(0, 0), (70, 150)], 220:

enter image description here

[(-90, -90), (-90, 90), (90, -90), (90, 90), (90, -90)], 670:

enter image description here

[(-390, 0), (-130, 120), (130, -120), (390, 0)], 1180:

enter image description here

Python 2, 152 bytes

f,t=input()
s=max(map(abs,sum(f,())))+t
w=s*2+1
k=range(-s,s+1)
print'P1',w,w
for y in k:
 for x in k:print+(sum(((a-x)**2+(b-y)**2)**.5for a,b in f)>t)

Try it online!

Outputs a PBM file to STDOUT. Sample output:

enter image description here


JavaScript (ES7), 212 196 bytes

with(Math)f=(c,l,...p)=>{m=l-max(...p)
c.height=c.width=s=min(...p)+l+m
for(i=0;i<s;i++)for(j=0;j<s;j++){for(d=k=0;1/p[k];)d+=hypot(p[k++]+m-i,p[k++]+m-j)
d>l||c.getContext`2d`.fillRect(i,j,1,1)}}

eval(`f(c,${e.value})`)
input{position:fixed}
<input id=e oninput=eval(`f(c,${e.value})`) value="100,-25,-25,-25,25,25,-25"><canvas id=c>

Outputs via first parameter which is a canvas element to draw on, second parameter is the threshold, then the remaining parameters are the loci. Edit: Saved 16 bytes thanks to @Arnauld, however the code is now dead slow and will trigger slow script warnings for large thresholds.


Haskell + Gloss, 165 bytes

import Graphics.Gloss
i=fromIntegral
h t=[i(-t)*3..i t*3]
d f t=display(InWindow""(t*3,t*3)(0,0))red$Line[(x,y)|x<-h t,y<-h t,i t>sum[sqrt$(x-u)^2+(y-v)^2|(u,v)<-f]]

Draws the shapes to the screen. It sometimes draws the images REALLY BIG, so I have cropped accordingly.

main = d [(5,8)] 100

enter image description here

main = d [(0,0), (70, 150)] 220

enter image description here

main = d [(-100, 0), (100, 0), (100, 0)] 480

enter image description here

main = d [(-250, -250), (-250, 250), (250, -250)] 1000

enter image description here