Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Linear interpolation algorithm

Status
Not open for further replies.

Tracid

Member level 3
Joined
Nov 1, 2006
Messages
57
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Location
Neded, Slovakia
Activity points
1,756
linear interpolation algorithm

Hi there!
I would have two questions to you.
Lets talk about the first only!In my Electronics project i have to use linear interpolation.I found this document on the web:
http://www.ieor.berkeley.edu/~goldberg/pubs/XY-Interpolation-Algorithms.pdf

The problem is that after reading and trying to follow the equations i get confused.
I think the author mixed the variables and thus its not possible to get to the result.

Could anybody please look at that document and find the bug or if there isnt any bud then explain me the method described?

Thanks!
 

interpolation algorithm

sorry,what do you thank for?
Do you find that link useful for yourself?
 

algorithm linear interpolation

Hi,

I did not read it in detail but pretty sure that's the Bresenham Algorithm, try to google it then you will find a lot of explanation.

Regards, CI.
 

    Tracid

    Points: 2
    Helpful Answer Positive Rating
interpolation integer algorithm

Thanks Ichan!
I am not an English man so could anybody tell me what does the prime value means? for example:
delatX and deltaY are relatively prime, or pime value of X.
*******
A link to Bresenham algorithm explanation:
**broken link removed**

Do you agree with that at the bottom wheres the ´last pixel reached?´ checked the comparison is good? It says jump back if X is smaller or equal to the destination.
But i think if its equal then one should not jump back because it will cross the destination point by 1 (so this way it jumps back until its not bigger)!

What do you think: is the ´greater or equal to 2*deltaX´ good or its enough ´ greater than´?
 

xy interpolation algorithm

Sorry, haven't read it.

Here **broken link removed** is the page where you can find some good article about Bresenham Algorithm with code examples.

Regards, CI.
 

algorithm for linear interpolation

I followed a Bresenham algorithm flow diagram to develop the necessary code for my microprocessor which rotates stepper motors.
I have now deep in that step calculation(determined which axis to move longer, move directions,etc.)
When writing the end parts of the subroutine one thing got unclear for me.

i broke my axis into 256 positions.The algorithm i followed says the longer axis have to move every iteration and the shorter axis(shorter distance from start to end)
have to move according to the calculation results.There would be no problem if i use full stepping because at every iteration i move the longer axis one full step(and thus one position).

But the reality is that i use microstepping and to advance exactly one position backward/forward i have to do exactly 6 microsteps.This means i shouldnt update the position info every iteration but only every six iterations.
(i did it this way because i want to avoide 16bit calculations)

My question is: does it affect the flow of line aproximation and completion if i update position info only after every 6 steps?
(so i do the calculations as if i was using full stepping but update the position only every 6 iterations)


Thanks!
 

linear interpolation algorithm implementation

In my opinion you will need to use larger number than BYTE, use integer or even long integer. If you use microcontroller and assembly programming then related 16bit math library must be available somewhere on the web.

Per your question, I think its possible but again using larger number is the better choice, IMHO.

Regards, CI.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top