
JMP는 다양한 용도에 맞는 색상 테마를 제공합니다. Jet은 연속적인 색채 테마 중 하나입니다. 위 그래프의 높이에 적합한 선택은 아닙니다. Jet은 짧은 것부터 긴 것까지 색상을 할당하는 방식이 아니라 모든 색상을 사용하려고 하기 때문입니다(Sequential 섹션의 색상표를 사용하는 것이 더 효과적일 수 있습니다). 보기에는 예쁘지만, 가장 작은 값과 가장 큰 값이 상당히 어둡습니다.
You can find these themes in Prefs (ctrl-K) -> Graphs, click on the themes to change them.You can find these themes in Prefs (ctrl-K) -> Graphs, click on the themes to change them.이러한 테마는 환경 설정(ctrl-K) -> 그래프에서 찾을 수 있으며, 테마를 클릭하면 변경됩니다.
이 영상에서는 Jet을 선택했는데, Jet이 스케일 중앙에 밝은 선을 만들어내기 때문입니다.
Zoomed 5X to see the sharp transition.Zoomed 5X to see the sharp transition.5배 확대하여 선명한 전환을 확인하세요.
JSL은 다음과 같습니다. 다음 색상을 얻기 위해 평균 9픽셀을 사용합니다. 최종 결과는 영역 간에 더 직선적인 선을 선호한다는 것입니다.
nr = 1080 + 16; // the 16 border is trimmed when the video is made in blender
nc = 1920 + 16; // because the flicker from blue to red to blue is distracting
board = J( nr, nc, Random Uniform( -1, 1 ) ); // only the initial bitmap is random
ww = New Window( "view", img = New Image( Heat Color( (board + 1) / 2, <<"jet" ) ) );
// jet produces the colors from 0 to 1, our bitmap is -1 to 1
dir = "$desktop/heatpic/"; // keep pictures for blender to make into a video
ipic = 1000000; // the picture name is all numeric with a leading 1
For( i = 1, i < 100000, i += 1,
img << setpixels( Heat Color( (board + 1) / 2, <<"jet" ) );
Show( i, i / 100000 );
ww << inval << updatewindow;
Wait( .0 );
img << Save Image( dir || Char( ipic += 1 ) || ".jpg", "jpg" );
background = If( Sum( board ) > 0, -1, 1 ); // keep the red/blue ratio balanced with the border color
step = Ceiling( i / 10000 ) + 3; // speed up the animation towards the end
For( jstep = 1, jstep <= step, jstep += 1,
Parallel Assign(
{
p = .95, // slight extra push away from 0 -- .1^.95 -> .11
L = .999, // regions close to 1 or -1 flip
z = 2.35, // flip value; more than this is unstable
// add padding with background color
prev = J( nr + 2, 1, background ) || (J( 1, nc, background ) |/ board |/ J( 1, nc, background )) || J( nr + 2, 1, background )
},
board[r, c] = (
x = prev[r :: r + 2, c :: c + 2] ; // depends on padding
v = Sum( x ) / 9 ; // each pixel is the average of the 9 pixel square
If( // but...
v < -L, z, // full negative flips to positive
v < 0, -(-v) ^ p, // tweak the average with
v < L, v ^ p, // a push away from zero
-z // full positive flips to negative
)
)
)
);
);
약 28,000개의 프레임 후에 JSL 루프를 멈췄습니다. 루프가 충분히 길고, 단계 크기가 증가하더라도 변화율이 너무 낮아서 흥미롭지 않았습니다.
JMP로 셀룰러 오토마타를 만들다니! 정말 멋지네요.