When drawing curved shapes in R, they are typically made up of a collection of short straight line segments (with circular line endings). The result looks good to the human eye but is a bit of a roundabout way of doing it as you need to interpolate the curve to get the coordinates of the segments. It also produces unnecessarily large files, although this is not a big problem unless the plot contains an extreme amount of curves.
Is there a way to create curved vector shapes the proper way using paths made up of anchor and pivot points as in the figure below?
An SVG quadratic curve will probably suffice. To draw it, you need the end points (which you have) and a control point which will determine the curve. To make a symmetrical curve, the control point needs to be on the perpendicular bisector of the line between the end points.
In graphics design, a vector path is a drawn or generated outline that represents a series of smooth straight (vector) lines instead of raster dots (or bitmap dots). Therefore, the paths are independent of resolution.
Using Curves in Photoshop Elements If you're using Photoshop Elements, you won't be able to create a Curves adjustment layer, but there is a similar tool you can use. To access this tool, select Enhance > Adjust Color > Adjust Color Curves. You can then click and drag the sliders to adjust the curve.
Short answer: "No".
Long answer: R doesn't know if your output device supports describing curves from formulae - for example PDF and PostScript can (I think) have arcs and curves, but R doesn't know if its drawing to one of those or to a bitmap device.
Hence when you want to draw an arc on an R plot, it can't do:
0 0 moveto
25 25 pi arcto
(or whatever the PostScript is) to describe an arc that will be infinitely smoothly zoomable. It has to render the arc into segments.
If you run the example in help(bezierGrob)
to a PDF device and zoom in, you can see the segments (zoomed in to 500%).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With