# 1 Softwareprojekt über Anwendungen effizienter Algorithmen, WS 2012/2013 Prof. Dr. Günter Rote Kurvenapproximation SWP Anwendungen von AlgorithmenTeam.

## Presentation on theme: "1 Softwareprojekt über Anwendungen effizienter Algorithmen, WS 2012/2013 Prof. Dr. Günter Rote Kurvenapproximation SWP Anwendungen von AlgorithmenTeam."— Presentation transcript:

1 Softwareprojekt über Anwendungen effizienter Algorithmen, WS 2012/2013 Prof. Dr. Günter Rote Kurvenapproximation SWP Anwendungen von AlgorithmenTeam 3 Team 3: Stefan Behrendt, Ralf Öchsner, Ying Wei

2 SWP Anwendungen von AlgorithmenTeam 3 Our task Technique Technologies Flow of process Preparations for Greedy approach Greedy approach Analysis Demo …. Outline

3 SWP Anwendungen von AlgorithmenTeam 3 Our task Approximation of point sequences by spline Input : The points with an order A predefined tolerance error Output : A curve, which goes through the selected points from original given points and can sufficiently good approximate the original point sequence

4 Used technologies : C++, Lua, IPE (with ipelib) QT for GUI Cubic Hermite spline, Cubic Bezier spline, Interpolation Greedy Algorithm SWP Anwendungen von AlgorithmenTeam 3 Technique

5 SWP Anwendungen von AlgorithmenTeam 3 Flow of process Calculate all Tangents of original given Point Sequence 1) Convert Selected Hermite Points & Tangents to Bezier control points 2) Then draw curve again by Bezier cubic spline 1) Convert given points and computed Tangents to Bezier control points in order to prepare with Greedy 2) Select points & Tangents using Greedy 1) Convert given points and computed Tangents to Bezier control points in order to prepare with Greedy 2) Select points & Tangents using Greedy Add spline into IPE for display

6 SWP Anwendungen von AlgorithmenTeam 3 Tangents Calculation

7 SWP Anwendungen von AlgorithmenTeam 3 Preparations for Greedy Approach

8 SWP Anwendungen von AlgorithmenTeam 3 Greedy Approach

9 SWP Anwendungen von AlgorithmenTeam 3 Greedy Approach

10 2.3.2) else if at the end, and the error >maxError (i==(size of points-1) && (errorUntil(i)>Error)) then insert points[i-1] into hermitePoints[end-1]; insert tangent[i-1] into tangents[end-1]; 2.3.3) else (when the error > maxError), insert points[i-1] into hermitePoints[end-1]; insert tangent[i-1] into tangents[end-1]; 3) Convert the selected hermitePoints to cPoints again. Method is the same with 2.2) T(n)=n 4) add bezier spline to IPE Greedy Approach SWP Anwendungen von AlgorithmenTeam 3

11 SWP Anwendungen von AlgorithmenTeam 3 Analysis

12 Analysis SWP Anwendungen von AlgorithmenTeam 3 We chose four example functions: sine in range [0 ; 10] square root function in range [0 ; 10] polynomial function of 4th degree: x – 2x² in range [-2 ; 2] polynomial function of 5th degree: x + 3.5x – 2.5x³ – 12.5x² +1.5x + 9 in range [-3 ; 1.5]

13 Analysis SWP Anwendungen von AlgorithmenTeam 3 Point interval: 0.1Point interval: 0.05Point interval: 0.02 Error value: 183.17 %54 %389,2 % Error value: 2.551.49 %28 %12,77 % Error value: 5338.6 %18 %7,186 % Error value: 1019.8 %10 %4,79 % Error value: 2015.84 %8 %3,194 % Error value: 5011.88 %163 %2,395 % On average36.436 %23,6 %6.067 % Sine Compression (in % compared with the original amount of point data)

14 Analysis SWP Anwendungen von AlgorithmenTeam 3 Evaluating our measurement results, we can formulate some conclusions about the behavior of the algorithm under several circumstances: Generally, the compression increases with higher (less strict) error limits. Runtime and compression are proportional; that means if we watch the calculations with the set of points and different error values, the runtime and compression increase / decrease in the same way The more adjacent the points are, the longer takes the computation, but the compression becomes better (except for the square root function) The set of points of polynomial functions cannot be approximated with high precision. Curve segments with small change of the tangent direction between points compress best A lot of inflection points lead to a bad compression

15 SWP Anwendungen von AlgorithmenTeam 3 Demo DEMO…

16 Thanks For Attention! Questions and Suggestions for improvement? SWP Anwendungen von AlgorithmenTeam 3

Download ppt "1 Softwareprojekt über Anwendungen effizienter Algorithmen, WS 2012/2013 Prof. Dr. Günter Rote Kurvenapproximation SWP Anwendungen von AlgorithmenTeam."

Similar presentations