Drawing a Koch Curve with MAPLE

  • Context: Maple 
  • Thread starter Thread starter Soff
  • Start date Start date
  • Tags Tags
    Curve Drawing Maple
Click For Summary
SUMMARY

The discussion focuses on creating a Koch curve using MAPLE programming language. The user attempts to define the Koch curve with a specific procedure that includes complex numbers and functions, but encounters errors in their initial implementation. They later switch to Mathematica, attempting to refine their approach but still face challenges. The user expresses a desire to learn and improve their programming skills in both MAPLE and Mathematica.

PREREQUISITES
  • Familiarity with MAPLE programming language and syntax
  • Understanding of complex numbers and their operations
  • Basic knowledge of fractals, specifically the Koch curve
  • Experience with Mathematica and its plotting functions
NEXT STEPS
  • Study MAPLE's procedural programming and function definitions
  • Learn about complex number manipulation in MAPLE
  • Explore Mathematica's plotting capabilities for complex functions
  • Research fractal generation algorithms, focusing on the Koch curve
USEFUL FOR

Anyone interested in programming fractals, particularly students and developers working with MAPLE or Mathematica, as well as those looking to enhance their skills in complex number computations and graphical representations.

Soff
Messages
36
Reaction score
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!
 
Physics news on Phys.org
Okay, I know, I did it totally wrong. However, I tried again and used this time the program Mathematica:

z := 1 + 2*I
x = 1/1000
a := 1/2 + Sqrt[3]/6*I
Element[b, {0, 1}]
Array[Solve[x = Sum[b/2\^k, k, {1, 10}], b], 1000]

Plot[Re[If[b = 0, a*Conjugate[z], a + (1 - a)*Conjugate[z]]],
Im[If[b = 0, a*Conjugate[z], a + (1 - a)*Conjugate[z]]]]

But program above doesn't work. But I'm getting closer to the solution! In case I find the solution to this problem, I will post it!
 

Similar threads

Replies
1
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 0 ·
Replies
0
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K