2013年7月28日日曜日

HP Prime、日本でも出るのか ?!

商標速報bot 様
https://twitter.com/trademark_bot/status/360840958767677441

[商願2013-49933]
商標:HP PRIME GRAPHING CALCULATOR /
出願人:Hewlett-Packard Development Company, L.P. /
出願日:2013年6月28日 /
区分:9(計算機ほか)

との事で、商標が出願されているそうです。日本でも出るのか !? と期待。

HP Primeは39gIIの電卓言語系統らしいPascal風言語を採用していて、「SysRPLはどうなのか」と心配しておりましたが、39gII系統でもSysRPLによるプログラムが動作するらしい感触がある(hpcalc.org に、そういう文書などがあります)ので、そこも期待したい所です。既に夏休みに入っていて、アメリカではもうすぐ新入学の季節。楽しみにしておきましょうか。

2013年7月21日日曜日

HP Prime シミュレータを動かしてみたゾ

HP Primeのシミュレータが流出して、早速使ってみました。未だ使いこなしている訳ではありませんが、簡単な報告を。

HP Primeの電卓言語はPascalっぽい独自のものの様で、基本は39gIIのものみたいです。既に、つぎの所にシミュレータ向けのサンプルコードが掲示されていました。

HP PRIME GRAPHING CALCULATOR - Technical data and performance comparison with others.
http://h30499.www3.hp.com/t5/Calculators/HP-PRIME-GRAPHING-CALCULATOR-Technical-data-and-performance/td-p/6043761#.Ueo1Mk2-eEL

しかし、ここにあるコードをコピペしても、一部、足りない部分などがあって、うまく動きません。それを修正したものを以下に示します。

Mandelbrot集合グラフィクスのコード。    Miguel Angel Caporalini 氏・作

---------------
 
iteration(c, bailoutValue, maxIter)
BEGIN
LOCAL iter := 0;
LOCAL z := (0,0);
WHILE (ABS(z) <= bailoutValue) AND (iter < maxIter) DO
z := z*z+c;
iter := iter+1;
END;
RETURN iter;
END;

LSclr(Ndx)
BEGIN
Ndx := ROUND(Ndx*186,0);
IF Ndx < 31 THEN RETURN 0+ 1*Ndx; END;
IF Ndx < 62 THEN RETURN 31+ 32*(Ndx-31); END;
IF Ndx < 93 THEN RETURN 1023- 1*(Ndx-62); END;
IF Ndx < 124 THEN RETURN 992+ 1024*(Ndx-93); END;
IF Ndx < 155 THEN RETURN 32736- 32*(Ndx-124); END;
IF Ndx < 186 THEN RETURN 31744+ 1*(Ndx-155); END;
RETURN 31775;
END;

colorize(itVal, maxIt)
BEGIN
IF itVal==maxIt THEN
// We are inside the Mandelbrot map
// Then the pixel is drawn in black
RETURN 0;
ELSE
RETURN LSclr(itVal/maxIt);
END;
END;

EXPORT Mandelbrot()
BEGIN
// Clean the screen (G0):RECT();

LOCAL dx, dy, c, xp, yp;
LOCAL iter, color;

// These 4 variables defined
// Our window of the complex plane

LOCAL xmin, xmax, ymin, ymax;
LOCAL maxIterations := 50;
LOCAL maxRadius := 2;

// Location
// Radio width to height should be 4:3

xmin := -2.5;
xmax := 1.5;
ymin := -1.5;
ymax := 1.5;

// Other parameters better:

//xmin := 0.315625;
//xmax := 0.515625;
//ymin := 0.28125;
//ymax := 0.43125;

dx := (xmax-xmin)/320;
dy := (ymax-ymin)/240;
c := (xmin,ymin);

// we loop over each pixel
// Of the screen wil Prime:
FOR yp FROM 0 TO 239 DO
FOR xp FROM 0 TO 319 DO
// Create the complex number c
// We need for iteration:

c := (xmin+xp*dx, ymax-yp*dy);

// Now iterate the formula and
// Return the number of iteration steps
// That was taken up
// That the complex number jump out
// The radius of convergence:

iter := iteration(c, maxRadius, maxIterations);

// Determines a color for the iteration number:
color := colorize(iter, maxIterations);

// Change color to that pixel:

PIXON_P(xp, yp, color);
END;
END;

// deja la imagen en la pantalla
// hasta que se presiona una tecla:
REPEAT UNTIL GETKEY() == -1;
FREEZE;
END;
 
---------------



これを、コピーし、HP Primeのシミュレータに貼り付けてやればOKです。具体的には、

1) Shift+1 (Program) で、Program Catalogue を呼び出します
2) メニューキーの[New]を押し、プログラム名を入力して、新しいプログラムファイルを作成します
3) 新規に作られるスケルトンを削除し、シミュレータの[Edit]メニューから[Paste]を呼び出して、上記のコードを貼り付けます
4) 再びShift+1 を押して Program Catalogue を呼び出し、プログラムファイル名を選択して [Run] を押して実行します





シミュレータであって、実機とは違うため、実行速度がここまで早いのか、その辺りは未知数です。当方のマシンでは描画に数分の時間を要しました。

面白いので、お試しを。

2013年7月17日水曜日

緊急連絡 ! 今すぐゲットせよ !!

※ 内容が古くなりました。最新版が、hpcalc.org 様より取得できます。 on 2014/08/19

HP-related Programs for the PC - hpcalc.org
http://www.hpcalc.org/prime/pc/



以下、以前の記事。

----------

MoHPC 様より。

HP PRIME EMULATOR!!! From HP China Agency
http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/forum.cgi?read=246491#246491

実際のダウンロードは、こちらのサイト様にある、リンクを。

http://www.cncalc.org/forum.php?mod=viewthread&tid=9087&extra=&page=2

謝謝 !!

追記 on 2013/07/18
上記サイト様によりますと、インストールされたフォルダにQuick refのPDFがあるそうです。


追記 on 2013/08/08
MoHPCに、Latest version の情報があります。

Latest HP Prime "emulator" software available :) - MoHPC
http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/forum.cgi?read=247930#247930

この記事によりますと、つぎのページで落とせるそうです。

Logiciel HP-Prime version finale - Tiplanet.org
http://tiplanet.org/forum/archives_voir.php?id=19496