|
Forum Index : Microcontroller and PC projects : CMM2: Hilbert curve
| Author | Message | ||||
| bar1010 Senior Member Joined: 10/08/2020 Location: United StatesPosts: 197 |
Hilbert Curve Hilbert Curve.zip 'Hilbert Curve cls : oder = 5 : turn = -1 : dx = 0 dy = 100 / oder : x = 100 : y = 50 first() end sub first inc oder, -1 fifth() fifth() third() sixth() third() inc oder end sub sub second if oder > 0 then first() sixth() end sub sub third if oder > 0 then first() seventh() turn = -turn end sub sub fourth turn = -turn seventh() end sub sub fifth fourth() second() end sub sub sixth px = x : x = x + dx py = y : y = y + dy line px, py, x, y, 1, rgb(yellow) end sub sub seventh tmp = dy dy = -turn * dx dx = turn * tmp end sub |
||||
| Plasmamac Guru Joined: 31/01/2019 Location: GermanyPosts: 596 |
Like it . Cool background gfx . Plasma |
||||
| Plasmamac Guru Joined: 31/01/2019 Location: GermanyPosts: 596 |
Like it . Cool background gfx . Plasma |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |