File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 2473
2473
...
2474
2474
public:
2475
2475
...
2476
+
2477
+ double noise(const point3& p) const {
2478
+ ...
2479
+ }
2480
+
2481
+
2482
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++ highlight
2476
2483
double turb(const point3& p, int depth) const {
2477
2484
auto accum = 0.0;
2478
2485
auto temp_p = p;
2486
2493
2487
2494
return fabs(accum);
2488
2495
}
2496
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
2497
+
2489
2498
...
2490
2499
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2491
2500
[Listing [perlin-turb]: < kbd> [perlin.h]</ kbd> Turbulence function]
2492
2501
2493
- Here `fabs()` is the absolute value function defined in `< cmath> `.
2502
+ Here `fabs()` is the absolute value function defined in `< cmath> `. Now we'll use the new Perlin
2503
+ turbulence function to update our Perlin sphere:
2494
2504
2495
2505
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
2496
2506
class noise_texture : public texture {
You can’t perform that action at this time.
0 commit comments