Spline Art: Dynamic Geometric Patterns from Random Points and Spline Curves

Spline Art: Dynamic Geometric Patterns from Random Points and Spline Curves
Loading the math board and drawing, please wait…
2020-12-13 05:44
① This example demonstrates how to create artistic plane figures by generating random points and connecting them with spline curves, with interactive controls to adjust parameters and observe changes. ② Core mathematical concepts include spline interpolation, sequence generation, conditional filtering, sorting, and geometric transformations, incorporating random variables and geometric distribution from probability, as well as curve sketching and plane figure construction. ③ Construction highlights: GeoGebra commands such as Sequence to generate point lists, KeepIf to filter points satisfying conditions, Sort to order lists, Append to add points, Spline to create smooth curves, If for conditional logic, and Textfield/button for user input; objects include n (count), lists l1 to l7, parameters b and c, an input box, and a button. ④ Suitable for high school and above, this serves as an exploration of mathematics-art integration, and can be extended to probability-statistics and function graphing, inspiring interest in randomness and geometric aesthetics.

GeoGebra Commands & Parameters

  1. Sequence(RandomPointIn[-5, 5, -5, 5], k, 1, n) → l1
  2. KeepIf(Length[P] ≤ 3, P, l1) → l2
  3. Sort(l2, Zip[Angle[P], P, l2]) → l4
  4. Sort(l3, Zip[Angle[P], P, l3]) → l5
  5. Append(l4, l4(1)) → l6
  6. Append(l5, l5(1)) → l7
  7. Spline(l7, 3) → b
  8. If(Length[l6] < 4, Spline[l6, 3], Spline[{l1(1), l1(2), l1(3), l1(1)}, 3]) → c
  9. Textfield(n) → InputBox1

AI Drawing Prompt Reference

Create a dynamic geometric pattern using random points and spline curves. First, generate a list of n random points l1, then filter points within a distance of 3 from the origin to form list l2. Sort l2 and l3 by their angles to get l4 and l5, and connect these points to form closed curves. Finally, use these points to create spline curves b and c. The process involves n points, 7 lists, and two parameters b and c.
The prompt above was compiled from the original drawing commands and is for reference only.