b'\n_START_ARTICLE_\nHilberta l\xc4\xabkne\n_START_PARAGRAPH_\nHilberta l\xc4\xabkne (zin\xc4\x81ma ar\xc4\xab k\xc4\x81 Hilberta telpu piepildo\xc5\xa1\xc4\x81 l\xc4\xabkne) ir nep\xc4\x81rtraukta frakt\xc4\x81\xc4\xbcu plakni piepildo\xc5\xa1a l\xc4\xabkne, kuru pirmoreiz aprakst\xc4\xabja v\xc4\x81cu matem\xc4\x81ti\xc4\xb7is D\xc4\x81vids Hilberts 1891. gad\xc4\x81._NEWLINE_T\xc4\x81 k\xc4\x81 t\xc4\x81 ir plakni piepildo\xc5\xa1a, t\xc4\x81s Hausdorfa dimensija (pie robe\xc5\xbeas ) ir ._NEWLINE_Eikl\xc4\xabda att\xc4\x81lums  ir , t.i. tas aug eksponenci\xc4\x81li ar ._NEWLINE_Vair\xc4\x81kdimensiju datub\xc4\x81z\xc4\x93s ir ietikts izmantot Hilberta k\xc4\x81rtu z-k\xc4\x81rtas l\xc4\xabknes viet\xc4\x81 t\xc4\x81s lab\xc4\x81ko lokalit\xc4\x81tes saglab\xc4\x81\xc5\xa1anas \xc4\xabpa\xc5\xa1\xc4\xabbu d\xc4\x93\xc4\xbc. Datab\xc4\x81zu algoritmi ar Hilberta k\xc4\x81rt\xc4\xabbu tiek pielietoti\n_START_SECTION_\nDatorprogramma\n_START_PARAGRAPH_\nA. R. Butzs  ir izveidojis algoritmu vair\xc4\x81kdimensiju Hilberta l\xc4\xabknes veido\xc5\xa1anai. libHilbert ir C++ bibliot\xc4\x93ka, kas izmanto Butza algoritmu vair\xc4\x81k\xc4\x81m dimensij\xc4\x81m._NEWLINE_\xc5\xa0\xc4\xab Java s\xc4\xabklietotne z\xc4\xabm\xc4\x93 Hilberta l\xc4\xabkni, rekurs\xc4\xabvi izsaucot \xc4\x8detras metodes:_NEWLINE_import java.awt.*;import java.applet.*;public class HilbertCurve extends Applet {_NEWLINE_    private SimpleGraphics sg=null;_NEWLINE_    private int dist0=512, dist=dist0;_NEWLINE__NEWLINE_    public void init() {_NEWLINE_        dist0 = 512;_NEWLINE_        resize ( dist0, dist0 );_NEWLINE_        sg = new SimpleGraphics(getGraphics());_NEWLINE_    }_NEWLINE__NEWLINE_    public void paint(Graphics g) {_NEWLINE_        int level=4;_NEWLINE_        dist=dist0;_NEWLINE_        for (int i=level;i>0;i--) dist /= 2;_NEWLINE_        sg.goToXY ( dist/2, dist/2 );_NEWLINE_        HilbertA(level); // start recursion_NEWLINE_    }_NEWLINE__NEWLINE_    private void HilbertA (int level) {_NEWLINE_        if (level > 0) {_NEWLINE_            HilbertB(level-1);    sg.lineRel(0,dist);_NEWLINE_            HilbertA(level-1);    sg.lineRel(dist,0);_NEWLINE_            HilbertA(level-1);    sg.lineRel(0,-dist);_NEWLINE_            HilbertC(level-1);_NEWLINE_        }_NEWLINE_    }_NEWLINE__NEWLINE_    private void HilbertB (int level) {_NEWLINE_        if (level > 0) {_NEWLINE_            HilbertA(level-1);    sg.lineRel(dist,0);_NEWLINE_            HilbertB(level-1);    sg.lineRel(0,dist);_NEWLINE_            HilbertB(level-1);    sg.lineRel(-dist,0);_NEWLINE_            HilbertD(level-1);_NEWLINE_        }_NEWLINE_    }_NEWLINE__NEWLINE_    private void HilbertC (int level) {_NEWLINE_        if (level > 0) {_NEWLINE_            HilbertD(level-1);    sg.lineRel(-dist,0);_NEWLINE_            HilbertC(level-1);    sg.lineRel(0,-dist);_NEWLINE_            HilbertC(level-1);    sg.lineRel(dist,0);_NEWLINE_            HilbertA(level-1);_NEWLINE_        }_NEWLINE_    }_NEWLINE__NEWLINE_    private void HilbertD (int level) {_NEWLINE_        if (level > 0) {_NEWLINE_            HilbertC(level-1);    sg.lineRel(0,-dist);_NEWLINE_            HilbertD(level-1);    sg.lineRel(-dist,0);_NEWLINE_            HilbertD(level-1);    sg.lineRel(0,dist);_NEWLINE_            HilbertB(level-1);_NEWLINE_        }_NEWLINE_    }}class SimpleGraphics {_NEWLINE_    private Graphics g = null;_NEWLINE_    private int x = 0, y = 0;    _NEWLINE__NEWLINE_    public SimpleGraphics(Graphics g) { this.g = g; }_NEWLINE_    public void goToXY(int x, int y) { this.x = x;   this.y = y; }_NEWLINE__NEWLINE_    public void lineRel(int deltaX, int deltaY) {_NEWLINE_        g.drawLine ( x, y, x+deltaX, y+deltaY );_NEWLINE_        x += deltaX;    y += deltaY;_NEWLINE_    }}_NEWLINE_V\xc4\x93l viena versija, kas realiz\xc4\x93 att\xc4\x93lojumu Lindenmaijera sist\xc4\x93m\xc4\x81. Kods rakst\xc4\xabts Tuga Turtle valod\xc4\x81. _NEWLINE_  def f_NEWLINE_    walk 10_NEWLINE_  end_NEWLINE_  def p_NEWLINE_    turn 90_NEWLINE_  end_NEWLINE_  def m_NEWLINE_    turn -90_NEWLINE_  end_NEWLINE_  def l(n)_NEWLINE_    return if n==0_NEWLINE_    p; r(n-1); f; m; l(n-1); f; l(n-1); m; f; r(n-1); p_NEWLINE_  end_NEWLINE_  def r(n)_NEWLINE_    return if n==0_NEWLINE_    m; l(n-1); f; p; r(n-1); f; r(n-1); p; f; l(n-1); m_NEWLINE_  end_NEWLINE_  _NEWLINE_  l(6)'