![]() ![]() However, small changes in the expansion coefficients already quickly change the shapes. In the space of all possible curves, most curves will look uninteresting, but some expansion coefficient values will give shapes that are recognizable. If we truncate the Fourier expansion of a curve at, say, n terms, we have 4 n free parameters. ( Download this post as a CDF to interact) The 2D sliders change the corresponding coefficient in front of the cosine function and the coefficient in front of the sine function. The next demonstration lets us explore the space of possible shapes. Using a sum of three sine functions and three cosine functions for each component,Ĭovers a large variety of shapes already, including circles and ellipses. Now given a parametrized curve γ( t) =, we can use such superpositions of sine and cosine functions independently for the horizontal component γ x( t) and for the vertical component γ y( t). And for smooth curves, the coefficients of the sin( k x) and cos( k x) terms approach zero for large k. It turns out that any smooth curve y( x) can be approximated arbitrarily well over any interval by a Fourier series. Generalizing the above (-1) ( k – 1)/2) k -2 prefactor in front of the sine function to the following even or odd functions,Īllows us to model a wider variety of shapes: A mixture of sine and cosine terms allows us to approximate more general curve shapes. If we use the cosine function instead, we obtain even functions. The sine function is an odd function, and as a result all of the sums of terms sin( k x) are also odd functions. Plotting this sequence of functions suggests that as n increases, y n( x) approaches a triangular function. Here are the first few members of this sequence of functions: Which is a sum of sine functions of various frequencies and amplitudes. The mathematical concept of Fourier series allows us to write down a finite mathematical formula for each of these line segments that is as close as wanted to a drawn curve.Īs a simple example, consider the series of functions y n( x), Then the drawing is made from a set of curve segments. As a “how to calculate…”, the post will not surprisingly contain a fair bit of Mathematica code, but I’ll start with some simple introductory explanations.Īssume you make a line drawing with a pencil on a piece of paper, and assume you draw only lines no shading and no filling is done. In this post, I want to show how to generate such equations. The formula for the curve that depicts Stephen Wolfram’s face, about one page in length, is about the size of a complicated physics formula, such as the gravitational potential of a cube. The real question is how you can make a formula that resembles a person’s face that fits on a single page and is simple in structure. But such an explicit function would be very large, hundreds of pages in size, and not useful for any practical application. From such an array, you could build an interpolating function, even a polynomial. While these are curves in a mathematical sense, similar to say a lemniscate or a folium of Descartes, they are interesting less for their mathematical properties than for their visual meaning to humans.Īfter Richard’s blog post was published, a coworker of mine asked me, “How can you make an equation for Stephen Wolfram’s face?” After a moment of reflection about this question, I realized that the really surprising issue is not that there is a formula: a digital image (assume a grayscale image, for simplicity) is a rectangular array of gray values. ![]() These included fictional character curves:Īnd, most popular among our users, person curves: Recently we added formulas for a variety of shapes and forms, and the Wolfram|Alpha Blog showed some examples of shapes that were represented through mathematical equations and inequalities. For instance, Mathematica can calculate millions of (more precisely, for all practical purposes, infinitely many) integrals, and Wolfram|Alpha knows hundreds of thousands of mathematical formulas (from Euler’s formula and BBP-type formulas for pi to complicated definite integrals containing sin(x)) and plenty of physics formulas (e.g from Poiseuille’s law to the classical mechanics solutions of a point particle in a rectangle to the inverse-distance potential in 4D in hyperspherical coordinates), as well as lesser-known formulas, such as formulas for the shaking frequency of a wet dog, the maximal height of a sandcastle, or the cooking time of a turkey. Our favorite topics are algorithms, followed by formulas and equations. Here at Wolfram Research and at Wolfram|Alpha we love mathematics and computations. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |