[R] Bezier to line segments
Greg Snow
538280 at gmail.com
Thu Jan 7 17:54:00 CET 2016
You may also be interested in the xspline function (graphics package,
so you don't need to install or load anything extra) since you mention
general splines. These splines can be made similar to Bezier curves
(but not exactly the same). The function returns a set of coordinates
(when draw=FALSE) that represent line segments for drawing the
approximate curve.
On Wed, Jan 6, 2016 at 6:43 AM, Adrian Dușa <dusa.adrian at unibuc.ro> wrote:
> I just found the package "bezier".
> Trying to find the needle, I missed the haystack...
>
> On Wed, Jan 6, 2016 at 9:56 AM, Adrian Dușa <dusa.adrian at unibuc.ro> wrote:
>
>> Dear All,
>>
>> I am interested into transforming Bezier curves (or general splines) to a
>> series of line segments.
>> For simplicity, the Bezier curves are either cubic (arches, no inflection
>> points) or they have at most one inflection point.
>>
>> The entry parameters are exactly four points (with x and y coordinates):
>> - start point
>> - end point
>> - and two control points to define the curve.
>>
>> I read a lot about parabolic approximation, and there is also a famous
>> deCasteljau algorithm.
>>
>> Before attempting to create my own function, I wonder if something like
>> this already exists in R (or can easily be adapted to R).
>>
>> Thanks in advance for any hint,
>> Adrian
>>
>> --
>> Adrian Dusa
>> University of Bucharest
>> Romanian Social Data Archive
>> Soseaua Panduri nr.90
>> 050663 Bucharest sector 5
>> Romania
>>
>
>
>
> --
> Adrian Dusa
> University of Bucharest
> Romanian Social Data Archive
> Soseaua Panduri nr.90
> 050663 Bucharest sector 5
> Romania
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
--
Gregory (Greg) L. Snow Ph.D.
538280 at gmail.com
More information about the R-help
mailing list