私が現在やろうとしているのは、画面上の点のグループを中心点から遠ざけることです。現在、このコードを使用しています (このコードを理解しやすいように変更したことに注意してください):
#d_x - the x coordinate of the dot at its default position
#d_y - the y coordinate of the dot at its default position
#dis_x - the distance along the x grid the point is away from the centre point
#dis_y - the distance along the y grid the point is away from the centre point
#zoom_level - the zoom level increased or decreased depending on the mouse wheel
z_x = (d_x + (dis_x * (1 + (zoom_level * 0.01))))
z_y = (d_y + (dis_y * (1 + (zoom_level * 0.01))))
drawText("*",z_x,z_y,)
このコードはほとんど機能しています。唯一の問題は、zoom_level が 0 の場合、ドットが正しい位置にあることですが、ズーム レベルを上げると、ドットが中心点から外側に拡大するのではなく、間違った方向に拡大し、反対方向に移動することです。中心点に向かって移動します。
この問題を解決する方法についてアドバイスをいただければ幸いです。
[編集] - 私はこれを言っていませんが、各点は中心点の周りのランダムな点に広がっています.