Jump to content

Marching squares: Difference between revisions

m
m (Python example)
Line 43:
[0, 0, 0, 0, 0]
])
 
def transform(xy, xmax):
x, y = xy
return (y, xmax - x)
 
# Find contours at a constant value of 0.1 and extract the first one found
Line 55 ⟶ 51:
[ (3.0, 1.0), (2.0, 2.0), (2.0, 2.0), (1.0, 3.0), (1.0, 4.0), (2.0, 5.0), (3.0, 5.0), (4.0, 4.0), (4.0, 3.0), (4.0, 2.0), (3.0, 1.0) ]
</pre>
 
 
=={{header|Wren}}==
4,107

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.