Thread Subject: 3d interpolation

Subject: 3d interpolation

From: Travis

Date: 28 Feb, 2009 18:46:01

Message: 1 of 10

I have data that, when graphed, looks like this

[URL=http://img144.imageshack.us/my.php?image=thing.jpg][IMG]http://img144.imageshack.us/img144/3429/thing.th.jpg[/IMG][/URL]

I need to get the Z values from the blue line attributed to the greenline. Should be a simple interpolation, but I cannot find it.

Subject: 3d interpolation

From: Travis

Date: 28 Feb, 2009 18:58:01

Message: 2 of 10

ok, lets try this link

[url=http://img144.imageshack.us/my.php?image=thing.jpg][img=http://img144.imageshack.us/img144/3429/thing.th.jpg][/url]

or this one

<a href="http://img144.imageshack.us/my.php?image=thing.jpg" target="_blank"><img src="http://img144.imageshack.us/img144/3429/thing.th.jpg" border="0" alt="Free Image Hosting at www.ImageShack.us" /></a><br /><br /><a href="http://img604.imageshack.us/content.php?page=blogpost&files=img144/3429/thing.jpg" title="QuickPost"><img src="http://imageshack.us/img/butansn.png" alt="QuickPost" border="0"></a>

Subject: 3d interpolation

From: John D'Errico

Date: 1 Mar, 2009 02:37:01

Message: 3 of 10

"Travis" <sinusoid2@hotmail.com> wrote in message <goc1fp$r0h$1@fred.mathworks.com>...
> ok, lets try this link
>
> [url=http://img144.imageshack.us/my.php?image=thing.jpg][img=http://img144.imageshack.us/img144/3429/thing.th.jpg][/url]
>
> or this one
>
> <a href="http://img144.imageshack.us/my.php?image=thing.jpg" target="_blank"><img src="http://img144.imageshack.us/img144/3429/thing.th.jpg" border="0" alt="Free Image Hosting at www.ImageShack.us" /></a><br /><br /><a href="http://img604.imageshack.us/content.php?page=blogpost&files=img144/3429/thing.jpg" title="QuickPost"><img src="http://imageshack.us/img/butansn.png" alt="QuickPost" border="0"></a>

Ok, one of those links finally worked. (Whew!)

But I'm not at all sure what you mean. What does
it mean to "attribute" the z values from one line to
another? Especially if the two curves do not live
in the same place in the (x,y) plane?

Can you be more specific about your goal here,
and what you know about the two curves?

John

Subject: 3d interpolation

From: Travis

Date: 1 Mar, 2009 03:15:18

Message: 4 of 10

"John D'Errico" <woodchips@rochester.rr.com> wrote in message <gocscd$ecm$1@fred.mathworks.com>...
> "Travis" <sinusoid2@hotmail.com> wrote in message <goc1fp$r0h$1@fred.mathworks.com>...
> > ok, lets try this link
> >
> > [url=http://img144.imageshack.us/my.php?image=thing.jpg][img=http://img144.imageshack.us/img144/3429/thing.th.jpg][/url]
> >
> > or this one
> >
> > <a href="http://img144.imageshack.us/my.php?image=thing.jpg" target="_blank"><img src="http://img144.imageshack.us/img144/3429/thing.th.jpg" border="0" alt="Free Image Hosting at www.ImageShack.us" /></a><br /><br /><a href="http://img604.imageshack.us/content.php?page=blogpost&files=img144/3429/thing.jpg" title="QuickPost"><img src="http://imageshack.us/img/butansn.png" alt="QuickPost" border="0"></a>
>
> Ok, one of those links finally worked. (Whew!)
>
> But I'm not at all sure what you mean. What does
> it mean to "attribute" the z values from one line to
> another? Especially if the two curves do not live
> in the same place in the (x,y) plane?
>
> Can you be more specific about your goal here,
> and what you know about the two curves?
>
> John

the two curves are in the same x,y, plane; they have identical routes even. They are a series of Lats and longs, one just have river miles associated with it. I want to associate the river miles to the one without the Z axis (which has a much finer resolution).

Subject: 3d interpolation

From: John D'Errico

Date: 1 Mar, 2009 04:52:01

Message: 5 of 10

"Travis" <sinusoid2@hotmail.com> wrote in message <gocuk6$acb$1@fred.mathworks.com>...

> the two curves are in the same x,y, plane; they have identical routes even. They are a series of Lats and longs, one just have river miles associated with it. I want to associate the river miles to the one without the Z axis (which has a much finer resolution).

Hmm. I've seen a few questions about river
interpolation recently.

You might want to test out a tool that I wrote
the other day. It can take a general curve in
n-dimensions, with an associated parameter
to be interpolated. Then for any point, or set
of points, it will interpolate the associated
parameter, finding the closest point on the
first curve.

It is fully working and I think now ready for
the file exchange. I've been working rather
hard recently getting it and a few other
related tools ready to put on the FEX.

John

Subject: 3d interpolation

From: Travis

Date: 1 Mar, 2009 05:11:01

Message: 6 of 10

"John D'Errico" <woodchips@rochester.rr.com> wrote in message <god49h$q7q$1@fred.mathworks.com>...
> "Travis" <sinusoid2@hotmail.com> wrote in message <gocuk6$acb$1@fred.mathworks.com>...
>
> > the two curves are in the same x,y, plane; they have identical routes even. They are a series of Lats and longs, one just have river miles associated with it. I want to associate the river miles to the one without the Z axis (which has a much finer resolution).
>
> Hmm. I've seen a few questions about river
> interpolation recently.
>
> You might want to test out a tool that I wrote
> the other day. It can take a general curve in
> n-dimensions, with an associated parameter
> to be interpolated. Then for any point, or set
> of points, it will interpolate the associated
> parameter, finding the closest point on the
> first curve.
>
> It is fully working and I think now ready for
> the file exchange. I've been working rather
> hard recently getting it and a few other
> related tools ready to put on the FEX.
>
> john

Sounds good, but the river mile needs to be interpolated onto the other, finer dataset. It really seems like there should be a simple intep command for something like this

Subject: 3d interpolation

From: John D'Errico

Date: 1 Mar, 2009 11:23:01

Message: 7 of 10

"Travis" <sinusoid2@hotmail.com> wrote in message <god5d5$9tp$1@fred.mathworks.com>...

> Sounds good, but the river mile needs to be interpolated onto the other, finer dataset. It really seems like there should be a simple intep command for something like this

No, there is not a simpler solution that I see.

Your curve is quite bumpy in two dimensions,
i.e., many jogs in the river. An interpolation
method like a spline or a piecewise linear
interpolant, which is really just a low (first)
order spline, must know where a point lies
on the curve.

In one dimension, y = f(x), the test is simple,
since the real numbers are ordered. In fact,
mathematics has a formal description of this
statement:

http://en.wikipedia.org/wiki/Real_number

It is easy to sort the real numbers, or to use
tools like bisection to determine the location
of a point within a long ordered sequence.

However given a 2-dimensional space curve,
such an ordering does not exist. So you need
a tool that can work with a general curve in
space (in this case R^2) and find a point on
that curve from an arbitrary set. Worse, your
curve is quite bumpy enough that it may not
be adequate to just find the closest data point
from the target curve, since that closest point
may be from the wrong part of the curve.

As I said, this question has been asked before
and no better solution was offered at the time.

John

Subject: 3d interpolation

From: Travis

Date: 11 Mar, 2009 02:27:02

Message: 8 of 10

"John D'Errico" <woodchips@rochester.rr.com> wrote in message <godr6l$5li$1@fred.mathworks.com>...
> "Travis" <sinusoid2@hotmail.com> wrote in message <god5d5$9tp$1@fred.mathworks.com>...
>
> > Sounds good, but the river mile needs to be interpolated onto the other, finer dataset. It really seems like there should be a simple intep command for something like this
>
> No, there is not a simpler solution that I see.
>
> Your curve is quite bumpy in two dimensions,
> i.e., many jogs in the river. An interpolation
> method like a spline or a piecewise linear
> interpolant, which is really just a low (first)
> order spline, must know where a point lies
> on the curve.
>
> In one dimension, y = f(x), the test is simple,
> since the real numbers are ordered. In fact,
> mathematics has a formal description of this
> statement:
>
> http://en.wikipedia.org/wiki/Real_number
>
> It is easy to sort the real numbers, or to use
> tools like bisection to determine the location
> of a point within a long ordered sequence.
>
> However given a 2-dimensional space curve,
> such an ordering does not exist. So you need
> a tool that can work with a general curve in
> space (in this case R^2) and find a point on
> that curve from an arbitrary set. Worse, your
> curve is quite bumpy enough that it may not
> be adequate to just find the closest data point
> from the target curve, since that closest point
> may be from the wrong part of the curve.
>
> As I said, this question has been asked before
> and no better solution was offered at the time.
>
> John

Since this is unavailable, is there a way to simply measure the trace of the graphs?

Subject: 3d interpolation

From: John D'Errico

Date: 11 Mar, 2009 03:20:17

Message: 9 of 10

"Travis" <sinusoid2@hotmail.com> wrote in message <gp77hm$b7a$1@fred.mathworks.com>...

> Since this is unavailable, is there a way to simply measure the trace of the graphs?

I'm sorry, but I don't know what you mean.

Please define "the trace of the graphs". Explain
what you mean. Do so clearly. Often one finds
that the simple act of explaining your problem
in clear unambiguous mathematics (or even
written language) is enough to formulate the
solution. Conversely, if you cannot formulate the
problem clearly, then it is also likely that you don't
really know what problem you are trying to solve.
And, if you don't understand your goals, then you
can't possibly solve a problem that you don't
yourself understand.

John

Subject: 3d interpolation

From: Travis

Date: 11 Mar, 2009 05:37:02

Message: 10 of 10

"John D'Errico" <woodchips@rochester.rr.com> wrote in message <gp7alh$5k7$1@fred.mathworks.com>...
> "Travis" <sinusoid2@hotmail.com> wrote in message <gp77hm$b7a$1@fred.mathworks.com>...
>
> > Since this is unavailable, is there a way to simply measure the trace of the graphs?
>
> I'm sorry, but I don't know what you mean.
>
> Please define "the trace of the graphs". Explain
> what you mean. Do so clearly. Often one finds
> that the simple act of explaining your problem
> in clear unambiguous mathematics (or even
> written language) is enough to formulate the
> solution. Conversely, if you cannot formulate the
> problem clearly, then it is also likely that you don't
> really know what problem you are trying to solve.
> And, if you don't understand your goals, then you
> can't possibly solve a problem that you don't
> yourself understand.
>
> John

I would like to measure the distance the graphs cover, straighen out the line and see how long it is. I think I found something in the Mapping toolbox (the distance command) and I will mess with that to see.

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
interpolation Travis 28 Feb, 2009 13:47:24
rssFeed for this Thread

Contact us at files@mathworks.com