2
$\begingroup$

A sinusoidal wave can be plotted in a two dimensions. Generally and simply :

y[x]=Sin[(2pi/lambda)x]

As it is being plotted, the horizontal axis (as a straight line) is x, and the lambda is the wave length after which the wave will be repeated. How can one reach to a sinusoidal wave over a circumference which is not a straight line; Moreover the division of the circumference by the lambda has to be an integer number. It means: n=(2pi*r)/lambda. Here n is the number of lambda (wave) on the circumference and must be an integer, also, r is the radii of the circle.

$\endgroup$
  • $\begingroup$ PolarPlot[r + Sin[n theta], {theta, 0, 2 Pi}] $\endgroup$ – Rahul Dec 24 '14 at 17:24
  • $\begingroup$ Thank you, however this plot is a bit different of which I expected but it is enough and ok. $\endgroup$ – Unbelievable Dec 24 '14 at 17:36
7
$\begingroup$

Since any 2D transformation that maps the sine function onto a circle will distort the functional form, I would suggest drawing the sine function perpendicularly to the 2D plane as follows:

frames = With[{m = 10, r = 1, h = .3},
   Table[
    Show[
     ParametricPlot3D[
      {r Cos[ϕ], r Sin[ϕ], h Sin[m ϕ - t]}, {ϕ, 0,
        2 Pi},
      PlotStyle -> Tube[.03],
      PlotRange -> 1.1 {{-r, r}, {-r, r}, {-h, h}}
      ],
     Graphics3D[{
       Opacity[.4],
       Polygon[2 {{-r, -r, 0}, {r, -r, 0}, {r, r, 0}, {-r, r, 0}}]
       }]
     ],
    {t, Pi/5, 2 Pi, Pi/5}]
   ];

ListAnimate[frames]

sine

This is the least distorted form in which you can probably expect to display the function.

The animation is only added for fun, you can omit it by setting t=0 and getting rid of the Table construct.

$\endgroup$
  • $\begingroup$ it is wonderful! $\endgroup$ – Unbelievable Dec 24 '14 at 17:44
  • $\begingroup$ I like the fun part, merry x-mas, $\endgroup$ – user9660 Dec 24 '14 at 17:58

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.