Selamat datang di . Blog ini bersifat umum; isi artikel multi-katagori sesuai mood dan apa yang sedang dipikirkan penulis. Anda dipersilakan untuk meng-copy, mem- paraphrase dan quote sesuai kaidah HAKI yang berlaku. Segala saran positif akan sangat penulis hargai. [EN: Welcome to This blog is general; multi-category content of the article according to mood and what the author was thinking. You are welcome to copy, to paraphrase and quote according to the rules of intellectual property laws. Any positive advice would be greatly appreciated writer.] -Prigell Priya Ragil-

Kamis, 23 Juni 2011

Excel Lissajous Curve Explorer

In mathematics, a Lissajous curve (Lissajous figure or Bowditch curve, pronounced /ˈlɪsəʒuː/ and /ˈbaʊdɪtʃ/) is the graph of a system of parametric equations

x=A\sin(at+\delta),\quad y=B\sin(bt),
which describe complex harmonic motion. This family of curves was investigated by Nathaniel Bowditch in 1815, and later in more detail by Jules Antoine Lissajous (a French name pronounced [lisaˈʒu]) in 1857.

The appearance of the figure is highly sensitive to the ratio a/b. For a ratio of 1, the figure is an ellipse, with special cases including circles (A = Bδ = π/2 radians) and lines (δ = 0). Another simple Lissajous figure is the parabola (a/b = 2, δ = π/2). Other ratios produce more complicated curves, which are closed only if a/b is rational. The visual form of these curves is often suggestive of a three-dimensional knot, and indeed many kinds of knots, including those known as Lissajous knots, project to the plane as Lissajous figures.

I put together a Lissajous Curve Explorer and Gallery to demonstrate how this works. Lissajous curves make a good subject matter for this demonstration because minute changes in their parameterized variables can produce an infinite variation as the output. 

Each plot in the Explorer contains 4,000 data points. Using named formulas to generate the data saves us the hassle and tedium of maintaining 8,000 cells of chart data (4,000 for x and 4,000 for y). Many of my projects contain dozens of series for a chart. In fact the Optical Illusions #4 had nearly the maximum of 255 series in the chart. So you can see how the number of cells to drive a chart could really add up. This technique avoids all of that.

What I do is create a named formula, n, to represent the number of points I want (this can be a constant or a formula).

The next step is to create a named formula, t:


In the Lissajous Curve Explorer, we are going to feed the trig function SIN so our t needs to vary between zero and 2π. This produces, in this case, 4,000 equallyspaced values for t.  Using ROW/INDIRECT is the same technique that we use in normal array formulas in worksheets to produce a loop - remember that all namedformulas are in fact array formulas.

Next we define the names, a and b, and link them to two worksheet cells so our users can enter values for a and b.

Next we define the named constant, δ, as π/2; and set _A and _B both equal to one.

The last thing is to create our named formulas for x and y:




That's it.  All we need to do now is create an XY (Scatter) chart with smooth lines and define a series:

Series name: ="Curve"

Series X values: =1!x

Series Y values: =1!y

Now we can plot an infinite number of Lissajous Curves using essentially no worksheet cells whatsoever. As part of the Excel Lissajous Curve Explorer I have included a gallery that you can scroll through to see a couple hundred of the best variations (in my opinion) that I've discovered thus far. You can edit the gallery by supplying values for a and b over in columns AB and AC on the worksheet. 

I've provided a scroll control to allow for easy navigation through the gallery. You can also toggle to User Select for direct input of a and b values. There are scroll controls there as well.

Here's the workbook:

Reference :
Reblog this post [with Zemanta]

Tidak ada komentar:

Posting Komentar