## 370 Reputation

10 years, 54 days

## I am not quite finished with the procedu...

 > # Herstart de sessie om alle oude variabelen en instellingen te wissen restart; # Definieer de parametrische vergelijkingen van de trefoil knoop x := t -> sin(t) + 2*sin(2*t); y := t -> cos(t) - 2*cos(2*t); z := t -> -sin(3*t); # Plot de kromme plots:-spacecurve([x(t), y(t), z(t), t = 0..2*Pi], color = "Blue", thickness = 2, axes = boxed);
 > # Herstart de sessie om alle oude variabelen en instellingen te wissen restart; # Definieer de kromme als een benoemde functie 'TrefoilKnot' TrefoilKnot := t -> [sin(t) + 2*sin(2*t), cos(t) - 2*cos(2*t), -sin(3*t)]; # Gebruik de functie 'TrefoilKnot' om de kromme te plotten plots:-spacecurve(TrefoilKnot(t), t = 0..2*Pi, color = "Blue", thickness = 2, axes = boxed);
```restart;
with(plots):
with(CurveFitting):

# Define the Trefoil Knot function
TrefoilKnot := t -> [sin(t) + 2*sin(2*t), cos(t) - 2*cos(2*t), -sin(3*t)];

# Generate interpolation points
interpolatiepunten := [seq(TrefoilKnot(t), t = evalf(0)..evalf(2*Pi), evalf(Pi/16))];

print("Interpolatiepunten:", interpolatiepunten);  # Check the interpolation points

# Extract x, y, z coordinates from the points
xPoints := [seq(p[1], p = interpolatiepunten)];
yPoints := [seq(p[2], p = interpolatiepunten)];
zPoints := [seq(p[3], p = interpolatiepunten)];
print("x Points:", xPoints);  # Check x points
print("y Points:", yPoints);  # Check y points
print("z Points:", zPoints);  # Check z points

# Generate t-values for the spline interpolation
tValues := [seq(i, i = 0..nops(interpolatiepunten)-1)]:
print("t Values:", tValues);  # Check t values

# Create splines for each coordinate
xSpline := Spline(tValues, xPoints, t, degree=3);
ySpline := Spline(tValues, yPoints, t, degree=3);
zSpline := Spline(tValues, zPoints, t, degree=3);
print("x Spline:", xSpline);  # Check x Spline
print("y Spline:", ySpline);  # Check y Spline
print("z Spline:", zSpline);  # Check z Spline

# Define the interpolated Trefoil Knot function
InterpolatedTrefoilKnot := t -> [xSpline(t), ySpline(t), zSpline(t)];

# Create plots for the original and interpolated knots
originalPlot := spacecurve(TrefoilKnot(t), t = 0..2*Pi, color = "Blue", thickness = 2, title = "Original Trefoil Knot");
interpolatedPlot := spacecurve(InterpolatedTrefoilKnot(t), t = 0..nops(interpolatiepunten)-1, color = "Red", thickness = 2, title = "Interpolated Trefoil Knot");

# Display the plots
display(Array([originalPlot, interpolatedPlot]), axes = boxed, orientation = [45, 45]);
```

 >

 >
original curve- interpolation curve- derative curve : take the integral to get the equation ?

I am not quite finished with the procedure yet
In the plot caption :
- line integral notation with /symbolic numerical value
- parameter curve equation entered
-equation of the projection curve

On how many ways i can program this for storing data ?

## @Carl Love  Thanks, very instructiv...

@Carl Love
Thanks, very instructive this procedure.

## Thanks, looks good.Try to add some more ...

Thanks, looks good.
Try to add some more text to get even a clearer picture.
This procedure is a nice basis to extend to more complicated surfaces f(x,y,z) with a spatial domain curve.
This example was already very instructive.

## Thanks, Admit it may be a bit unclear, w...

Thanks, Admit it may be a bit unclear, will try to word it more clearly.

Integral expression = Elliptic expression = float expression

That can be shown in the plot itself this above output.
Also outside the plot would be useful to show the outcome of the procedure.

## Thanks , It seems that in the procedure ...

Thanks , It seems that in the procedure there is a provision if a special function occurs in the arc length ( red curve) calculation then a numeric value of this is shown?
Can the special function symbolic expression  just remain with the numeric value behind it in the plot?

```VisualizeFunctionAndCurve(2*x+y^2, sin(t)+1, 2*cos(t), 0, [0, 1/2*Pi]);
```

## Thanks, yes this definitely became an ov...

Thanks, yes this definitely became an overhaul of the procedure ( I didn't expect )
I definitely need to study this : how some things have been changed and why.
What is the objection to using a function operator instead of an expression notation ?
This procedure is still for simple surfaces it appears
For more complicated surfaces it becomes f(x,y,z) and the domain becomes a space curve
I still want to try to extend the existing procedure...

## If this should work the VisualizeFunctio...

If this should work the VisualizeFunctionAndCurve () procedure, then a further modification for the domain curve

A plane curve can be represented in two ways: by an equation H(x,y)=0 (the implicit description) and parametrically by a pair of equations with one parameter (the parameter description).

## @sija  Thanks, i will look at it ag...

@sija
Thanks, i will look at it again

## Interesting, but from the looks of it, n...

Interesting, but from the looks of it, none of the animations work in Maple 2024, or am I mistaken?

## Have revisited the task and have the ide...

Have revisited the task and have the idea that this elaboration could be better in Maple ?

 > restart;
 (1)
 > # Define functions and variables f := (x, y) -> 2*x + y^2;  # Function f(x, y) x := t -> 1 + t;           # Function x(t) y := t -> 2*t;             # Function y(t)
 (2)
 > # Compute derivatives dx_dt := D(x);  # Derivative of x with respect to t dy_dt := D(y);  # Derivative of y with respect to t
 (3)
 > # Definitie van de functies x(t) en y(t) x(t) := t + 1; y(t) := 2*t; # Definitie van de functie f(x(t), y(t)) f(x, y) := 2*x + y^2; f_t := unapply(f(x(t), y(t)), t);  # Omzetten van f in termen van t # Berekenen van de afgeleiden dx_dt := diff(x(t), t); dy_dt := diff(y(t), t); # Definitie van de uitdrukking voor booglengte (ds) ds := sqrt(dx_dt^2 + dy_dt^2); # Bereken de booglengte van de kromme van t = 0 tot t = 1 curve_length := Int(f_t(t)*ds, t = 0 .. 1); evaluated_curve_length := value(Int(f_t(t)*ds, t = 0 .. 1)); # Output van de inerte en geëvalueerde vorm van de booglengte curve_length = evaluated_curve_length;
 (4)
 > # Plotting with(plots):     surface := plot3d(f(x, y), x = 0..3, y = 0..4, axes=boxed, labels=['x', 'y', 'z'], style=surfacecontour):  # 3D surface plot of the function f     curve := spacecurve([x(t), y(t), f(x(t), y(t))], t = 0..1, color=red, thickness=2):  # Parametric space curve     line_xy := spacecurve([[1, 0, 0], [2, 2, 0]], color=black, thickness=2, linestyle=2):  # Line in the xy-plane from (1,0) to (2,2)     vertical_line1 := spacecurve([[1, 0, 0], [1, 0, f(1,0)]], color=blue, thickness=2):  # Vertical line from the xy-plane to the spacecurve at x=(1,0)     vertical_line2 := spacecurve([[x(0.5), y(0.5), 0], [x(0.5), y(0.5), f(x(0.5), y(0.5))]], color=blue, thickness=2):  # Vertical line at t=0.5     vertical_line3 := spacecurve([[x(1), y(1), 0], [x(1), y(1), f(x(1), y(1))]], color=blue, thickness=2):  # Vertical line at t=1
 > # Display all plots together in a single visualization     display(surface, curve, line_xy, vertical_line1, vertical_line2, vertical_line3, title="3D Plot of f(x,y) = 2x + y^2 with Curve and Vertical Lines");

## @Carl Love I asked the AI for an al...

@Carl Love
I asked the AI for an alternative to the is () command and it didn't come up with a thoughtful answer anyway.
Fine to is ( ) command and apparently there are no alternatives to this?
I find it tricky with that evaluation in Maple with the cauchy-riemann equations.

## @janhardo Can I also do that check ...

@janhardo
Can I also do that check on the cauchy riemann equations via : evalb ?

```if evalb(u_x = v_y) and evalb(u_y = -v_x) then
printf("The function is analytic (holomorphic) at this point.\n");
printf("The derivative f'(z) is %a + I*%a\n", u_x, v_y);
else
printf("The function does not satisfy the Cauchy-Riemann equations and is not analytic.\n");
end if```

## @Carl Love Thanks for the programmi...

@Carl Love
Thanks, Yes, that "is" command is essential to establish that the cauchy-riemannt equations are true for all variables

## @Axel Vogt Thanks, forms a nice bas...

@Axel Vogt
Thanks, forms a nice basis to rewrite the procedure and the hereby use the D operator instead of diff command.

## @acer  Yes, when to use a branch fr...

@acer
Yes, when to use a branch from a topic?
There are several ways to derive that zeta(2) value.
I thought this was 1 branch to explore this further and another branch for a different approach to derive zeta( 2).
Otherwise it will be one long thread of proof methods topics , fine by me too and forget the branches.

 3 4 5 6 7 8 9 Last Page 5 of 44
﻿