10.01.2013 Views

ComputerAided_Design_Engineering_amp_Manufactur.pdf

ComputerAided_Design_Engineering_amp_Manufactur.pdf

ComputerAided_Design_Engineering_amp_Manufactur.pdf

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Similarly, if P i is in the sector P 2O 2Q, the distance D i can be obtained. The only exception is when P i lies<br />

outside either of these sectors, in which case D i is defined as the minimum distance between P i and either<br />

of the end points P 1 and P 2.<br />

Having the deviation formula available, we can therefore find the optimal biarc which passes through<br />

two end points P 1 and P 2 by formulating it as a least square problem:<br />

© 2001 by CRC Press LLC<br />

�<br />

Minimize Di( �)<br />

i<br />

( ) 2<br />

(2.8a)<br />

subject to ( �min �� ��max)<br />

(2.8b)<br />

where �min and �max are constrained by the Equation (2.6)<br />

This is a nonlinear optimization problem of one variable with simple-bounded constraints and can<br />

be easily solved by any of the commonly available optimization algorithms such as the sequential quadratic<br />

programming method.<br />

Biarc Curve Fitting to a Large Set of Discrete Data Points<br />

Having developed the formulation of the biarc curve and the optimal biarc sub-problem, we are now in<br />

the position to tackle the approximation of a large set of data points so that the resulting biarc curves<br />

are C continuous and within a specified tolerance of the data points. We assume the data points are<br />

given in the sequence that traces out the desired profile. The approach combines both a search process<br />

and an optimization process. In the search process, the algorithm starts from an initial point and searches<br />

forward to find the largest number of consecutive data points that can be approximated by a single biarc<br />

and still not violate the tolerance constraint. The search process uses a binary search approach, whereas<br />

finding the optimal biarc within the search steps solves an optimal biarc sub-problem as formulated by<br />

the model in the previous section.<br />

The algorithm can be summarized as follows:<br />

if (max_deviation_opt_biarc(1,n) � tolerance)<br />

add optimal_biarc(start,end);<br />

else<br />

start � 1<br />

while (start � n)<br />

end � longest_end(start, start�1, n);<br />

add optimal_biarc(start,end);<br />

start � end;<br />

endwhile<br />

endif<br />

where optimal_biarc returns the optimal biarc between two end points and longest_end is the binary<br />

search to find the furthest point that does not violate the tolerance constraint.<br />

The routine longest_end (Integer Routine longest_end(start, low, high)) can be summarized as<br />

follows:<br />

deviation � max_deviation_opt_biarc(start, high)<br />

while (deviation � tolerance)<br />

high � (low � high)/2<br />

if (high � low) return high;<br />

else deviation � max_deviation_opt_biarc(start, high)<br />

endif<br />

endwhile<br />

return high<br />

where max_deviation_opt_biarc solves the optimal biarc subproblem and returns the maximum deviation<br />

of the optimal biarc.<br />

1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!