473,408 Members | 2,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Interpolation of a discrete 3D trajectory

Hey guys,

I'm looking for a way to smooth out the edges of a 3D trajectory that is
really just a sequence of points in space. I've got co-ordinates just
like these:

0.072 -0.25 0.582
-0.036 -0.25 0.644
0.036 0.338 0.104

What I would like to have now is for the trajectory not to pass through
the individual points at a sharp angle, but to have an interpolated
curve instead.

Is there a reasonably easy way from, say, a 10 co-ordinate input to get
a 90 co-ordinate output with the 8 inner nodes replaced by a 10-point
quasi-curve?

(A cookbook recipe and SciPy didn't seem to contain obvious solutions.)

--
Peter
Jun 17 '07 #1
2 2441
Peter Beattie a écrit :
Hey guys,

I'm looking for a way to smooth out the edges of a 3D trajectory that is
really just a sequence of points in space. I've got co-ordinates just
like these:

0.072 -0.25 0.582
-0.036 -0.25 0.644
0.036 0.338 0.104

What I would like to have now is for the trajectory not to pass through
the individual points at a sharp angle, but to have an interpolated
curve instead.

Is there a reasonably easy way from, say, a 10 co-ordinate input to get
a 90 co-ordinate output with the 8 inner nodes replaced by a 10-point
quasi-curve?

(A cookbook recipe and SciPy didn't seem to contain obvious solutions.)
Something like
newdata= FFT.inverse_real_fft(FFT.real_fft(data),newlen)*ne wlen/len(data)
should be enough ?
+ maybe have to add some Hanning windowing filter to keep limits clean.
Jun 17 '07 #2
Peter Beattie wrote:
I'm looking for a way to smooth out the edges of a 3D trajectory that is
really just a sequence of points in space....
What I would like to have now is for the trajectory not to pass through
the individual points at a sharp angle, but to have an interpolated
curve instead.

Is there a reasonably easy way from, say, a 10 co-ordinate input to get
a 90 co-ordinate output with the 8 inner nodes replaced by a 10-point
quasi-curve?

(A cookbook recipe and SciPy didn't seem to contain obvious solutions.)
If you know more about what the curve should be like, you can decide
among various ways to interpolate (the term for what you want to do).
I personally like the cubic B-spline because it is so easy to
"understand" it visually.
--
--Scott David Daniels
sc***********@acm.org
Jun 17 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: irond_will | last post by:
Does anyone know how I might directly access PIL's bicubic interpolator? I have an arbitrary array of points for which I need to find interpolated color values. Unfortunately, I have no clue how...
14
by: Charles Banas | last post by:
I'm not sure if this is the right place to ask about this, but I've seen several posts in the past regarding Akima's Bivariate Interpolations routines, and i'm wondering if someone can give me some...
3
by: Jonas Ernst | last post by:
Hi, Can somebody give me some hints how to do a line interpolation without using floating point arithemtics? The function shall do a linear interpolation between 2 points (line interp?) and...
2
by: Francois Vanderseypen | last post by:
Imagine a discrete 2D space of any size. Say, you have a 100x100 pixels (.net) panel and you have discrete cells of 10x10 pixels. Thinking e.g. of the game of life. I would like to draw a line in...
5
by: James | last post by:
Hi there, I'm a beginner level programmer and am wondering how to achieve a Simple Cannon Ball trajectory with c#. See, i know how to work out the initial horizontal and vertical velocity of the...
0
by: Alison Givens | last post by:
I have the following problem. (VB.NET 2003 with CR) I have a report with a multiple-value discrete value and a rangevalue. The report shows fine in the viewer, but when I hit the export to pdf...
5
by: xandra | last post by:
i understood the concept of interpolation search. but i couldn't understand what would be the steps for that search. for example, if i'm searching for J in this file A A B E F H J M N N N N O P P...
0
by: MonkeeSage | last post by:
There are several string interpolation functions, as well as string.Template. But here's yet another. This one emulates ruby's inline interpolation syntax (using #{}), which interpolates strings as...
4
by: squishywaffle | last post by:
Greetings, I was wondering if there was a python Module/Library out there that handles some trajectory/physics stuff like moving an object along a straight path in an X,Y 2D (or 3D) plane or...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.