- #1
Soff
- 36
- 0
I try to create my first program with MAPLE! Therefore, I really need your help!
I'd like to draw a Koch curve with the two function f and d and a constant a=0.5+sqrt(3)/6 *I.
Koch curve:=proc(x,y);
local a ,d, f,m;
z:=evalf(x+y*I);
a := 1/2+sqrt(3)/6*I;
d :=a*conjugate(z) ;
f:=a+(1-a)*conjugate(z) ;
m:=0; to 40 while abs(z)<1 do z:=d..f;
m:=m+1;
od m
end:
plot(Koch curve);
However, I know, I'm not very good at programming because it's the first time I do something like this. Can someone give me some advices? What's wrong with the program above? I think there are lots of errors, but can anyone help me? I really want to learn it!
I'd like to draw a Koch curve with the two function f and d and a constant a=0.5+sqrt(3)/6 *I.
Koch curve:=proc(x,y);
local a ,d, f,m;
z:=evalf(x+y*I);
a := 1/2+sqrt(3)/6*I;
d :=a*conjugate(z) ;
f:=a+(1-a)*conjugate(z) ;
m:=0; to 40 while abs(z)<1 do z:=d..f;
m:=m+1;
od m
end:
plot(Koch curve);
However, I know, I'm not very good at programming because it's the first time I do something like this. Can someone give me some advices? What's wrong with the program above? I think there are lots of errors, but can anyone help me? I really want to learn it!