Last active
May 4, 2021 17:53
-
-
Save jose-almir/20201ad806476a8095e39b4e5b8456e9 to your computer and use it in GitHub Desktop.
Wave (Sample 01)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:math'; | |
import 'dart:typed_data'; | |
import 'package:flutter/material.dart'; | |
const amp = 20.0; | |
const freq = 1 / 150; | |
final mirrorX = Float64List.fromList([ | |
1, 0, 0, 0, | |
0, -1, 0, 0, | |
0, 0, 1, 0, | |
0, 0, 0, 1 | |
]); | |
enum WavePosition { bottom, top } | |
double sine(double t, double A, double freq) => A * sin(2 * pi * freq * t); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment