Peano curve: Difference between revisions
m
→{{header|J}}
(Add Ada) |
m (→{{header|J}}) |
||
Line 528:
=={{header|J}}==
This Hilbert variant is taken directly from the j lab "viewmat".
<
load'viewmat'
hp=: 3 : '(|.,]) 1 (0 _2 _2 ,&.> _2 _1 0 + #y) } (,.|:) y'
Line 534:
WR=: 16777215 16711680
viewrgb WR {~ hp ^:7 HP
</
Or, a smaller [[j:File:Hp1.png|example]] (6 iterations instead of 7) and a different color selection:<lang J> require 'viewmat'
hp=: 3 : '(|.,]) 1 (0 _2 _2 ,&.> _2 _1 0 + #y) } (,.|:) y'
MG=: 256 #. 128 0 128,:0 192 0
viewrgb 2 ([ # #"1) MG {~ hp ^:6 [ 0, 0 1 0 ,: 0,/lang>
=={{header|Java}}==
|