It has been raining a few days ago, and today it is finally Sunny. We use algorithms to generate an umbrella image to celebrate.
An umbrella can be seen as an Arc Surface, usually with eight or six umbrella bones. Create an Arc Surface with 8 points first.
Script code:
Vertices = dimension1: 8 dimension2: 16u = from 0 to (2 * PI) dimension1v = from (pI * 0.25) to (pI * 0.5) dimension2x = cos (V) * sin (u) y = sin (v) z = cos (v) * Cos (u) A = 10.0x = A * xy = A * YZ = A * z
The generated image is as follows:
A simple umbrella is generated, but the actual umbrella is more complicated. OK continues to be optimized. The cosine curve is used to highlight the umbrella bone in the next step:
Vertices = dimension1: 256 dimension2: 16u = from 0 to (2 * PI) dimension1v = from (pI * 0.2) to (pI * 0.5) dimension2s = 1.0-0.12 * ABS (COS (u * 4) x = cos (v) * sin (u) * Sy = sin (v) z = cos (V) * Cos (u) * Sa = 10.0x = A * xy = A * YZ = A * z
The generated image is as follows:
For more information about related software, see: Mathematical graphics visualization tool. Use script code with custom syntax to generate mathematical graphics. This software is free open source. QQ chat group: 367752815
Umbrella shape of mathematical graphics