2
$\begingroup$

I am confused now (in thinking about limits and continuity) how curves are represented in a typical modern computer. Curves are "continuous" in that there is no discrete change from one angle to the next. Wondering how the computer approximates this and/or what equations it uses/approximates.

$\endgroup$
4
$\begingroup$

A curve can be quantized (also known as rasterized) to a certain precision after which it is discrete, and the issue is gone. If you see a picture that contains a curve on a modern computer, there's a good chance it already has been rasterized (e.g. PNG or jpeg).

However, it is possible to represent curves (and other primitives) directly. Then you're looking at vector graphics. In most implementations of vector graphics only a couple specific subsets of curves are supported, most often circles, ellipses and Bézier curves. Especially the latter is the most common powerful generic way of storing curves.

It is possible to describe an arbitrary curve through some mathematical framework and storing the mathematical description of the curve. But such a generalized approach is rarely done for computer graphics.

$\endgroup$
  • $\begingroup$ Would be interested to know how bezier curves solve the problem of infinite continuity. $\endgroup$ – Lance Pollard Jun 20 '18 at 14:09
  • 2
    $\begingroup$ @LancePollard Bézier curves are 'infinitely precise', because they are still a mathematical object. They stay this way until they are rasterized or otherwise quantized, at which point an approximation of the curve is derived at a desired precision. An example would be using an algorithm to lay the Bézier curve over a grid of pixels, and if the curve enters a certain box in the grid you colour that box black, otherwise white. That's a very simple algorithm though, there are various articles written about the rendering of Bézier curves - just search around a bit. $\endgroup$ – orlp Jun 20 '18 at 14:13
  • $\begingroup$ Like orlp said, if a curve can be represented mathematically, it can be represented by a computer. But just to expand on this a little, the modern mathematical study of curves and surfaces in space is called "differential geometry". I suggest looking that up. All of those mathematical tools are available to the computer scientist, and the right combination of tools depends on what job needs to be done. $\endgroup$ – Pseudonym Jun 21 '18 at 1:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.