returns a list of `Vec3` (i.e. positions) by repeatedly moving along the line in `steps`; the beginning and end of the line will be in this list.
(int steps)
| 566 | r.add(c.position()); |
| 567 | } |
| 568 | return r; |
| 569 | } |
| 570 | |
| 571 | |
| 572 | /** |
| 573 | * calls function 'fun' with a parameter that goes from 0 -> 1 (inclusive) in 'samples' steps. Then hands the results to `data('t*', ...)` |
| 574 | */ |
| 575 | public FLine fromSampling(Function<Double, Object> fun, int samples) { |
| 576 | List<Object> rr = new ArrayList<Object>(); |
| 577 | for (int i = 0; i < samples; i++) { |
| 578 | double alpha = i / (samples - 1f); |
| 579 | Object o = fun.apply(alpha); |