Maxbox Starter132 Dragon Curve Sound2wordpress
Maxbox Starter132 Dragon Curve Sound2wordpress
1. Pascal
2. Python
3. Turtle
4. Delphi
5. Java Script
A dragon curve is any member of a family of self-similar fractal curves, which can be
approximated by recursive methods such as Lindenmayer systems as a procedure in
Pascal shows:
Recursively a right curling dragon is a right dragon followed by a left dragon, at 90-
degree angle. And a left dragon is a left followed by a right. The same you get also with
Python and Turtle in maXbox:
1 Const DRAGFUNC =
2 'def dragon(level=4, size=200, direction=45): '+LF+
3 ' if level: '+LF+
4 ' right(direction) '+LF+
5 ' dragon(level-1, size/1.41421356237, 45) '+LF+
6 ' left(direction * 2) '+LF+
7 ' dragon(level-1, size/1.41421356237, -45) '+LF+
8 ' right(direction) '+LF+
9 ' else: '+LF+
10 ' forward(size) ';
11
12 function PyCodeDragonTurtle(imgpath, aAPIKey: string): string;
13 begin
14 with TPythonEngine.Create(Nil) do begin
15 //pythonhome:= 'C:\Users\User\AppData\Local\Programs\Python\Python
16 try
17 loadDLL;
18 autofinalize:= false;
19 ExecString('from turtle import right,left,forward,speed, exitonc
20 ExecStr(DRAGFUNC);
21 ExecStr('speed(0)');
22 //ExecStr('hideturtle()');
23 ExecStr('dragon(6)');
24 ExecStr('exitonclick()');
25 //result:= (EvalStr('r.json()')); *)
26 except
27 raiseError;
28 finally
29 Free;
30 end;
31 end;
32 end;
The dragon curve is probably most commonly thought of as the shape that is
generated from repeatedly folding a strip of paper in half.
https://sourceforge.net/projects/maxbox/files/Examples/13_General/1320_dragon_curve_51_py.txt/download
with Depth = 9
Python Pascal
Turtle Sound
Try the sound that turtle with angle as amplitude and step as tone
JavaScript Embedded
The Microsoft Edge WebView2 control allows you to embed web technologies (HTML,
CSS, and JavaScript) in your native apps. The WebView2 control uses Microsoft Edge as
the rendering engine to display the web content in native apps.
https://sourceforge.net/projects/maxbox/files/Examples/13_General/1320_dragon_curve_51_py_turtle_js.txt/download
drawDragon2(13,1,500);
Colormaps
Colormaps if (adir= -1) and (cn mod 50=1) then
canvas.Pen.Color:= random(clwhite);
Colormaps 3
canvas.Pen.Color:= random(clred);
Published by DEV
Unreal Heal
From the Fourier series definition in Wikipedia.
Compact Code
1 var
2 num, den: Extended;
3 den:= BinToInt('1'+value.Split(['.'])[1].Replace('1','0',[rfReplaceAl
Death Star
Display a region that consists of a large sphere with part of a smaller sphere removed
from it as a result of geometric subtraction.
https://sourceforge.net/projects/maxbox5/files/examples/1345_death_star_graph12.pas/download
Get more than one function result as the example of a vector below:
1 type
2 TTVector = array of double;
3
4 procedure TNormalize(var v: TTVector);
5 var alen: double;
6 begin
7 alen:= Sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);
8 v[0]:= v[0] / alen;
9 v[1]:= v[1] / alen;
10 v[2]:= v[2] / alen;
11 end;
In Python we use a named tuple. Here the three values x,y,z of the namedtuple are
applied, in order, to the keyword arguments in the function. Those 3 arguments can be
addressed as positional arguments still, after all!
Lunschania – Vals
Geniessen Sie ruhige und entspannte Tage in der Natur. Entdecken Sie in unmittelbarer
Nähe eines der höchstgelegenen Skigebiete Graubündens, traumhafte Wandergebiete,
urtümliche Alpen, herrliche Seen und Flüsse, hohe Berge und abwechslungsreiche
Biketouren.
Vals – Platz Chrüz Riedboda
Valser Rhein St. Peter und Paul Valéstrasse
Lunschania
Lunschania – Vals December 2024
Advertisements
maxbox4
December 27, 2024 at 11:59 am Edit
Music is the pleasure the human soul experiences from counting without being aware that it is counting
(Gottfried Leibniz)
Like
Reply
maxbox4
December 27, 2024 at 12:03 pm Edit
I like the concept of sonification: translating data into sounds. There is a huge amount of contents in
the Internet about this technique and there are several packages in Delphi, Python, R, SonicPi to
help you to sonificate your data.
Like
Reply
maxbox4
December 27, 2024 at 12:05 pm Edit
All you need is understanding how Mandelbrot Set is generated by the recursive equation. There are
hundreds of webpages where you can find it. I think there is no more to understand. Thanks for your
comment.
Like
Reply
Leave a comment
Write a comment...
Comment
e Date: 2024.12.27
12:13:16 +01'00'