ScratchData LogoScratchData
Back to crkcity's profile

2 superimposed harmonic motions - Lissajous figures with little code

CRcrkcity•Created June 22, 2022
2 superimposed harmonic motions - Lissajous figures with little code
5
2
36 views
View on Scratch

Instructions

Two superimposed perpendicular harmonic motions, implemented with very little code. Try varying the ratio of the two motions to see what patterns result. With ratio (xy ratio) to 1 and phase (xy phase difference) set to 0 you get a straight line. Then set xy phase difference to 90 degrees you get a circle. Change ratio to something other than 1 for more interesting curves called Lissajous figures. Whole number ratios yield figures that connect and repeat in simpler figures. Try 2/3 and 2 or very close to those for distinctive patterns. Harmonograph pendulums yield such patterns.

Description

These patterns (Lissajous figures) result from superposition of two perpendicular simple harmonic motions, one along x and one y: x = amplitude * sine(ratio * time + phase) y = amplitude * sine(time) We model that with just a few code blocks. We got the same resulting patterns with a real paint pendulum and a glow in the dark pendulum, that swing along two axes. Those eventually slow down (friction), whereas these coded ones don't end. It's a special case of the harmonic motion seen in many physical phenomena. This code simplifies my previous lissajous patterns and uses a standard set of variables (except instead of greek terms omega, delta, I use plain language terms). Put motion in a separate sprite from pen for conceptual simplicity. For many settings, these patterns are enclosed by rectangular boundaries as seen in real pendulums with two axes, like Barton's pendulums knocked sidewise, or a harmonograph. But if you set the ratio to 1 and the phase difference to 90 degrees, you get a circle. The frequency of a simple harmonic oscillator like this one, or a vibrating guitar string, is independent of amplitude. These oscillate with the same frequency whether swung gently or hard or, if a vibrating string, plucked gently or hard. (We don't vary angular frequency, ω = dθ/dt. We treat the period (T, time it takes to go around and back to original position) as constant, so the angular frequency is 2π divided by the period, ω=2πT, but here we just varied time. The patterns come out the same).

Project Details

Project ID708052440
CreatedJune 22, 2022
Last ModifiedJuly 4, 2022
SharedJune 28, 2022
Visibilityvisible
CommentsAllowed