Autor |
Beitrag |
Centron88
Hält's aus hier
Beiträge: 5
|
Verfasst: Fr 29.10.04 21:16
Hallo Leute
Ich bin blutiger Anfänger und habe als Aufgabe die Darstellung der PeanoKurve als rukursive Darstellung. Wie die Kurve ansich aussieht und funktioniert ist eigentlich klar. Unklar ist mir, wie sage ich Delphi das es die Kurve nach meinen Vorstellungen zeichnen soll.
Ich habe ein Quadrat welches sich in 9 Quadrate teilen muss um dann ab der Mitte von Quadrat 1 bis hin zu Quadrat 9 die Kurve zu zeichnen. Wie bringe ich Delphi nun diese Teilung bei. Falls das irgendwie unklar ist einfach mal unter wwwzenger.informatik.../projekte/peano.html nachschauen.
Vielen Dank
|
|
NeWsOfTzzz
Beiträge: 233
D4 Prof
|
Verfasst: Fr 29.10.04 21:40
Ich glaub fast dir wird keiner helfen..
|
|
Centron88
Hält's aus hier
Beiträge: 5
|
Verfasst: Fr 29.10.04 21:51
Titel: ???
Warum wird keiner helfen?? Wie müssen Fragen gestaltet sein?? Danke für deinen Tipp..
|
|
NeWsOfTzzz
Beiträge: 233
D4 Prof
|
Verfasst: Fr 29.10.04 21:56
Ganz einfach.. glaubst du es arbeitet sich jemand für dich in so ein sauschweres thema ein? ^^
|
|
.Chef
Beiträge: 1112
|
Verfasst: Fr 29.10.04 22:53
Einarbeiten nicht, ich kannte es schon. Allerdings nur in der Theorie. In der Praxis nimmst du ein 400x400 großes Image, und führst dann diesen Code aus:
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39:
| const init = 'X'; genX = 'XFYFX+F+YFXFY-F-XFYFX'; genY = 'YFXFY-F-XFYFX+F+YFXFY'; var dist, oldx, oldy : Real; dep : Byte; dirx, diry : ShortInt; procedure Peano(com : string;Level : Integer); var i : Integer; a : ShortInt; x, y : Real; begin for i:=1 to Length(com) do case com[i] of 'X' : if Level > 0 then Peano(genX,Level-1); 'Y' : if Level > 0 then Peano(genY,Level-1); 'F' : begin x:=oldx+dist*dirx; y:=oldy+dist*diry; Image1.Canvas.LineTo(Round(x),Round(y)); oldx:=x; oldy:=y; end; '+' : begin a:=dirx;dirx:=diry;diry:=-a;end; '-' : begin a:=diry;diry:=dirx;dirx:=-a;end; end; end; begin dirx:=1; diry:=0; dep:=4; oldx:=0; oldy:=400; dist:=400/(exp(dep*ln(3))-1); Image1.Canvas.MoveTo(0,400); Peano(init,dep); end; |
Es hat mich grad mal interessiert ...
Gruß,
Jörg
_________________ Die Antworten auf die 5 häufigsten Fragen:
1. Copy(), Pos(), Length() --- 2. DoubleBuffered:=True; --- 3. Application.ProcessMessages bzw. TThread --- 4. ShellExecute() --- 5. Keine Vergleiche von Real-Typen mit "="!
|
|
NeWsOfTzzz
Beiträge: 233
D4 Prof
|
Verfasst: Fr 29.10.04 23:17
Na denn hat der Threadersteller Glück gehabt
|
|
BenBE
Beiträge: 8721
Erhaltene Danke: 191
Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
|
Verfasst: Fr 29.10.04 23:23
Bleibt nur noch die Frage: Was bringt einem das, wenn man so'ne Kurve zeichnen kann?
_________________ Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
|
|
.Chef
Beiträge: 1112
|
Verfasst: Fr 29.10.04 23:27
Das ist wie die Frage nach dem Sinn von Mathematik.
_________________ Die Antworten auf die 5 häufigsten Fragen:
1. Copy(), Pos(), Length() --- 2. DoubleBuffered:=True; --- 3. Application.ProcessMessages bzw. TThread --- 4. ShellExecute() --- 5. Keine Vergleiche von Real-Typen mit "="!
|
|
BenBE
Beiträge: 8721
Erhaltene Danke: 191
Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
|
Verfasst: Fr 29.10.04 23:41
Wobei man in Mathe wenigstens noch eine Lebensnotwendigkeit erkennen könnte (wenn man wirklich wöllte). Das fällt mir bei Peano-Kurven schon wesentlich schwieriger, auch obwohl ich Mathe-Begeistert bin.
_________________ Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
|
|
.Chef
Beiträge: 1112
|
Verfasst: Fr 29.10.04 23:43
Also sach ma ... wasn los? Findest du Fraktale nicht faszinierend? Die Peano-Kurve ist nämlich ein solches ...
_________________ Die Antworten auf die 5 häufigsten Fragen:
1. Copy(), Pos(), Length() --- 2. DoubleBuffered:=True; --- 3. Application.ProcessMessages bzw. TThread --- 4. ShellExecute() --- 5. Keine Vergleiche von Real-Typen mit "="!
|
|
BenBE
Beiträge: 8721
Erhaltene Danke: 191
Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
|
Verfasst: Sa 30.10.04 00:00
Wenn du so sagst ...
Ich find aber immernoch, dass so'n Mandelbrot besser aussieht und sogar schmeckt.
_________________ Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
|
|
Centron88
Hält's aus hier
Beiträge: 5
|
Verfasst: Sa 30.10.04 00:03
Titel: DANKE
Hallo Leute
Echt spitze von euch so weit zu gehen. Vielen dank an dieser Stelle. Eigentlich liegt das Problem aber an anderer Stelle. Ich tue mich recht schwer mit dem umsetzen meiner Gedanken in Delphi. Ich werde nun mit deinem Code etwas rumspielen un versuchen zu verstehen wie du was machst.
PS: PeanoKurven sind wegen ihrer Flächenfüllenden Eigenschaften so interessant;)
|
|