(Translation is done using Gemini.) コード中にある定義trifillを取っててください。変数名が被りやすいので気をつけてください。 Please extract the definition trifill from the code. Be careful as the variable names can easily conflict. メモとクレジットにある挑戦状に是非挑戦してみてください。 Please try the challenge in Notes and Credits.
1日経って最適化をしました。 参考にしたプログラムはリミックス元に貼ってあります。 挑戦状 私のtrifllはScratchという環境で、与えられたアルゴリズムが到達しうる理論上の最高速度を実装した、一つの到達点だ。 このコードに小手先の最適化は通用しない。 なぜならば考えうる最大限の最適化をしてきたからだ。 考えうるすべてのアイデアは検証し尽くした。 数学的に厳密性を保ち、これ以上削ぎ落とすことのできない、純粋なロジックだ。私が知る限り、既存のいかなる公開プログラムを超える。 だが私は満足しない。 私の最速がScratchの限界とは言えないだろう。 必ず世界の何処かには、私の思考が及ばぬ、全く新しい発想を持つものがいるかも知れない。 さて、私を超えられると思うもの思わないもの問わず超えてみせろ。 (条件) ・厳密性を維持すること。 描画結果は、このプログラムとピクセルレベルで同一でなければならない。いかなる犠牲も許されない。(ただし浮動小数点数演算の誤差は認める) ・アルゴリズムの根幹を変えないこと。 これは「trifill」の速度競争であり、全く別の塗りつぶし手法との比較ではない。 ・同一環境下で、より高いパフォーマンス(低い実行時間)を叩き出すこと。 さあ私のtrifllを超えてみせろ。私はこのコミュニティに期待している。 A Challenge My program, "trifill," represents an ultimate achievement in the Scratch environment. It implements the theoretical maximum speed an algorithm can achieve, given the constraints. This code is immune to superficial optimizations, because I've already implemented every possible one. I've exhaustively tested every conceivable idea. This is pure logic, mathematically rigorous and stripped down to its absolute essentials. To the best of my knowledge, it surpasses any publicly available program. But I am not satisfied. I can't say that my fastest program represents the absolute limit of Scratch. Somewhere in the world, there might be someone with a completely new idea, one that I have never considered. So, whether you think you can surpass me or not, I challenge you to try. Surpass my trifill. Conditions: Maintain Rigor. The rendering results must be identical to this program on a pixel-by-pixel level. No compromises are acceptable. (However, floating-point calculation errors are permitted.) Do Not Change the Core Algorithm. This is a speed competition for "trifill," not a comparison against completely different fill methods. Achieve Higher Performance. You must produce a faster execution time under the same environmental conditions. Come on, surpass my trifill. I have high expectations for this community.