ヒート マップを作成しようとしていますが、最初は強度マスクを描画する必要があります。GWT を使用しているため、座標をランダムに生成し、円を (必要な勾配で) それらの場所に配置して、出力が得られるようにしました。重なり合った円になります。Dylan Vesterのインテンシティ マスクを見ると、非常に滑らかになります。どうすればヒート マップを描画できますか?? また、Dylan Vester と同様に、出力はどのように達成されますか?? また、円を描いている場合、2つ以上の円の交点で強度を決定する方法、それらがどのように達成されたのかという質問もあります?? これが私のコードです
// creating the object for the heat points
Heat_Point x = new Heat_Point();
// Variables for random locations
int Min = 1,Max = 300;
int randomx,randomy;
// Generating set of random values
for( int i = 0 ; i < 100 ; i++ ) {
// Generating random x and y coordinates
randomx = Min + (int)(Math.random() * ((Max - Min) + 1));
randomy = Min + (int)(Math.random() * ((Max - Min) + 1));
// Drawing the heat points at generated locations
x.Draw_Heatpoint(c1, randomx, randomy);
}
そして、これがHeat_Pointクラスであるヒートポイントをプロットする方法です
Context con1 = c1.getContext2d(); // c1 is my canvas
CanvasGradient x1;
x1 = ((Context2d) con1).createRadialGradient(x,y,10,x,y,20);
x1.addColorStop(0,"black");
x1.addColorStop(1,"white");
((Context2d) con1).beginPath();
((Context2d) con1).setFillStyle(x1);
((Context2d) con1).arc(x,y,20, 0, Math.PI * 2.0, true);
((Context2d) con1).fill();
((Context2d) con1).closePath();`
ここにいくつかの画像を追加することになっていましたが、十分な評判がありませんでした:D:P