typo fixes

pull/189/head
Vicente Lucendo 7 years ago
parent a292f581be
commit b90f10f5f6

@ -38,14 +38,14 @@ float noise (in vec2 st) {
float fbm (in vec2 st) { float fbm (in vec2 st) {
// Initial values // Initial values
float value = 0.0; float value = 0.0;
float amplitud = .5; float amplitude = .5;
float frequency = 0.; float frequency = 0.;
// //
// Loop of octaves // Loop of octaves
for (int i = 0; i < OCTAVES; i++) { for (int i = 0; i < OCTAVES; i++) {
value += amplitud * noise(st); value += amplitude * noise(st);
st *= 2.; st *= 2.;
amplitud *= .5; amplitude *= .5;
} }
return value; return value;
} }

@ -80,7 +80,7 @@ for (int i = 0; i < octaves; i++) {
for (int i = 0; i < OCTAVES; i++) { for (int i = 0; i < OCTAVES; i++) {
value += amplitude * abs(snoise(st)); value += amplitude * abs(snoise(st));
st *= 2.; st *= 2.;
amplitud *= .5; amplitude *= .5;
} }
``` ```

@ -11,7 +11,7 @@ y = amplitude * sin(x * frequency);
"></div> "></div>
* Try changing the values of the frequency and amplitude to understand how they behave. * Try changing the values of the frequency and amplitude to understand how they behave.
* Using shaping functions, try changing the amplitud over time. * Using shaping functions, try changing the amplitude over time.
* Using shaping functions, try changing the frequency over time. * Using shaping functions, try changing the frequency over time.
By doing the last two exercises you have managed to "modulate" a sine wave, and you just created AM (amplitude modulated) and FM (frequency modulated) waves. Congratulations! By doing the last two exercises you have managed to "modulate" a sine wave, and you just created AM (amplitude modulated) and FM (frequency modulated) waves. Congratulations!
@ -80,7 +80,7 @@ Using more or less the same technique, it's also possible to obtain other effect
for (int i = 0; i < OCTAVES; i++) { for (int i = 0; i < OCTAVES; i++) {
value += amplitude * abs(snoise(st)); value += amplitude * abs(snoise(st));
st *= 2.; st *= 2.;
amplitud *= .5; amplitude *= .5;
} }
``` ```

@ -87,14 +87,14 @@ float snoise(vec2 v) {
float turbulence (in vec2 st) { float turbulence (in vec2 st) {
// Initial values // Initial values
float value = 0.0; float value = 0.0;
float amplitud = .5; float amplitude = .5;
float frequency = 0.; float frequency = 0.;
// //
// Loop of octaves // Loop of octaves
for (int i = 0; i < OCTAVES; i++) { for (int i = 0; i < OCTAVES; i++) {
value += amplitud * abs(snoise(st)); value += amplitude * abs(snoise(st));
st *= 2.; st *= 2.;
amplitud *= .5; amplitude *= .5;
} }
return value; return value;
} }

Loading…
Cancel
Save