[R] Bezier to line segments
dusa.adrian at unibuc.ro
Sat Jan 9 16:35:32 CET 2016
Thanks Greg, I'll take a look on that package as well.
I'm still unsure whether to calculate these splines at each function run,
or to store the coordinates of each spline (curve) and read them when
needed. There are performance issues to take into account, but from my
current tests it seems that calculating the coordinates each time decreases
For the moment I opted to store the values, but if I will find a quick(er)
alternative, will change it at the next version.
This is for a new package called venn (now on CRAN), to which I am going to
send an announcement to r-packages.
On Thu, Jan 7, 2016 at 6:54 PM, Greg Snow <538280 at gmail.com> wrote:
> 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>
> >> Dear All,
> >> I am interested into transforming Bezier curves (or general splines) to
> >> series of line segments.
> >> For simplicity, the Bezier curves are either cubic (arches, no
> >> 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
> > and provide commented, minimal, self-contained, reproducible code.
> Gregory (Greg) L. Snow Ph.D.
> 538280 at gmail.com
University of Bucharest
Romanian Social Data Archive
Soseaua Panduri nr.90
050663 Bucharest sector 5
[[alternative HTML version deleted]]
More information about the R-help