This project is simulator of gravity "Stars" pull eachother [How to simulate the gravity] Click the stage to make a "Star" Click the menu button and slide a knob to change these parameter: weight ( Mass of the star that is generated ) zoom speed ( "Star" movement speed ) Press Right/Left Key to change the weight Press Right/Left and N key to change the zoom Press Right/Left and M key to change the speed Press space key to turn on/off mode of afterimage Click the bottom left button to Save/Load your code [Notes] The effect of gravity follows an inverse square law I made the effect of gravity limited for it wouldn't be large number I made the parameter sliders use natural logarithms This project uses the most blocks in my projects for now(about 1500) Please tell me issues if you find it [Save code topic] I will make it if there is a demand [Updates] 25/04/18 v2.0.1 Save Code Input Bug Fix 25/09/02 v2.0.2 Removed process of atan2 to be higher speed 25/10/26 v2.1.0 fix wrong calculation This project is remake project of this: https://scratch.mit.edu/projects/1043450038/ turbowarp, hqpen: https://turbowarp.org/1140800010/fullscreen?hqpen
重力のシミュレーターです。 [使い方] クリックで星を追加します。 メニューボタンをクリックすると次のパラメーターを変更できます: weight (星の重さ) zoom (拡大度) speed (星の移動速度) 右左矢印キーで星の重さを変更します。 またそのキーと同時にNを押下すると 拡大/縮小 できます。 そのキーと同時にMを押下すると 計算速度を変更できます。 スペースキーで残像の有無を変えます。 左下のボタンで セーブ/ロード ができます。 [注釈及び幾つかの情報] 重力の影響は逆二乗則に従い減衰します。 - これは3D空間の話で、この作品では2D空間を扱っていますが重力の減衰はこれに従っています。 重力の影響が大きすぎることのないようにその最大値を設定しています。 - 純粋にこのプロジェクトで逆二乗則に従いますと二星間の距離がゼロに近づいた時に重力の影響がとても大きくなります。 パラメータのスライダーは自然対数を使っています。 このプロジェクトは今の所私のプロジェクトの中で最も多くブロックを使っています。 ですがこのプロジェクトの核となる重力計算の部分のブロック数は100かそれくらいです。 なんらかの問題を見つけた場合はコメントしていただけますと幸いです。 この作品は下記プロジェクトのリメイクです: https://scratch.mit.edu/projects/1043450038/ turbowarp, hqpen: https://turbowarp.org/1140800010/fullscreen?hqpen 気づいた方はいないと思うのですが一応この作品はアカウント作成三周年の記念作品です。