Документация Engee

Трехмерный график: роза

n = 800;
A = 1.995653;
B = 1.27689;
C = 8;

r = range( 0, 1, length=n );
theta=range( -2, 20*pi, length=n);

THETA = repeat(collect(theta)', length(r))
R = repeat(collect(r)', length(theta))'

# Количество лепестков за один оборот
petalNum=3.6;

x   = @. 1-(1/2)*((5/4)*(1-mod(petalNum*THETA, 2*pi)/pi)^2-1/4)^2
phi = @. (pi / 2) * exp(-THETA / (C*pi))
y   = @. A*(R^2)*(B*r - 1)^2*sin(phi)
R2 = @. x*(R*sin(phi) + y*cos(phi))

X = @. R2*sin(THETA);
Y = @. R2*cos(THETA);
Z = @. x*( R*cos(phi) - y*sin(phi));

using Plots, Colors, ColorSchemes
cs = ColorScheme([colorant"red", colorant"darkred"])
surface( X, Y, Z, c=cgrad(cs), camera=(40,50), legend=false )

interactive-scripts/images/data_analysis_draw_rose_script/0252a595a5cd859e87d65d26c2d78861afb28448