RadialWave#
Qualified name: manim\_physics.wave.RadialWave
- class RadialWave(*sources, wavelength=1, period=1, amplitude=0.1, x_range=[- 5, 5], y_range=[- 5, 5], **kwargs)[source]#
Bases:
Surface
A 3D Surface with waves moving radially.
- Parameters:
sources (Optional[np.ndarray]) – The sources of disturbance.
wavelength (float) – The wavelength of the wave.
period (float) – The period of the wave.
amplitude (float) – The amplitude of the wave.
x_range (Iterable[float]) – The range of the wave in the x direction.
y_range (Iterable[float]) – The range of the wave in the y direction.
kwargs – Additional parameters to be passed to
Surface
.
Examples
Example: RadialWaveExampleScene ¶
from manim import * class RadialWaveExampleScene(ThreeDScene): def construct(self): self.set_camera_orientation(60 * DEGREES, -45 * DEGREES) wave = RadialWave( LEFT * 2 + DOWN * 5, # Two source of waves RIGHT * 2 + DOWN * 5, checkerboard_colors=[BLUE_D], stroke_width=0, ) self.add(wave) wave.start_wave() self.wait() wave.stop_wave()
class RadialWaveExampleScene(ThreeDScene): def construct(self): self.set_camera_orientation(60 * DEGREES, -45 * DEGREES) wave = RadialWave( LEFT * 2 + DOWN * 5, # Two source of waves RIGHT * 2 + DOWN * 5, checkerboard_colors=[BLUE_D], stroke_width=0, ) self.add(wave) wave.start_wave() self.wait() wave.stop_wave()
Methods
Animate the wave propagation.
Stop animating the wave propagation.
Attributes
animate
Used to animate the application of any method of
self
.animation_overrides
color
depth
The depth of the mobject.
fill_color
If there are multiple colors (for gradient) this returns the first one
height
The height of the mobject.
n_points_per_curve
sheen_factor
stroke_color
width
The width of the mobject.