Research Article

A Theoretical Analysis Method of Spatial Analytic Geometry and Mathematics under Digital Twins

Table 3

Matlab program of geometry.

r = 0 : 0.2:sqrt(2);

t = 0 : 0.2 : 2  pi + 0.2;
[T, R] = mesh grid(t, r);
X = cos(T). R;
Y = sin(T). R;
Z = X.^2 + 2 Y.^2
axis([−3, 3, −3, 3, −15]);
hold on;
quiver3(0, 0, 0, −1.5, 0, 0, 2.2, “k,” “filled” “LineWidth,”1.6)
quiver3(0, 0, 0, 0, −1.5, 0, 2.2, “k,” “filled” “LineWidth”, 1.6)
quiver3(0, 0, 0, 0, 0, 0, 2.5, 3, “k,” “filled” “LineWidth,” 1.6)
text(0, −0.6, 8, “Z”);
text(0, −4, 0, “Y”);
text(−4, 0, 0.2, “X”);
axis off;
hold on;
set(gef, “color,”[1 1 1]);
surf(X, Y, Z, “FaceColor,” “g”);
z = 6-2 X.^2- Y.^2
surf(X, Y, Z, “EdgeColor,””None”);
hold on;
X = squrt(2)  cos(t)
Y = squrt(2)  sin(t)
Z = X.^2 + 2 Y.^2;
plot3(X, Y, Z, “k”,”LineWidth,” 3);
hold on;
view(0, 90)