Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #7063 > unrolled thread
| Started by | Thomas Howard <thomaswhoward@gmail.com> |
|---|---|
| First post | 2011-12-09 10:56 +0000 |
| Last post | 2011-12-09 10:56 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
Mathematica Question Thomas Howard <thomaswhoward@gmail.com> - 2011-12-09 10:56 +0000
| From | Thomas Howard <thomaswhoward@gmail.com> |
|---|---|
| Date | 2011-12-09 10:56 +0000 |
| Subject | Mathematica Question |
| Message-ID | <jbspg8$3o0$1@smc.vnet.net> |
Problem: Given the coordinates of a point (x,y) find the closest point
on the following curve (using jpg file of the image) and report its
coordinates.
The graph has x in [0,1.96875] and y in [-.96875,.96875]
(fractal starting at coordinates (0,0) and in each step it halves the
length of the line segment).
Mathematica has the command that finds the points closest to (2,3)
from a given list of points {(-1,1),(1,-1),(1,1),(-1,1)}:
In: Nearest[{{-1,-1}, {1,-1},{1,1},{-1,1}},{2,3}]
Out: {1,1}
It also has a command that finds the distance from each pixel in an
image to the nearest background pixel and replaces the color of the
pixel by its distance.
In:
Out[1]=
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web