Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Randomize path commands to fix #45 #47

Open
wants to merge 2 commits into
base: 1.x
Choose a base branch
from

Conversation

lingsamuel
Copy link

@lingsamuel lingsamuel commented Mar 21, 2020

fix #45

随机拆分直线(L)与二次贝塞尔曲线(Q),使得每个字母生成的向量每次均不同。

潜在的问题或改进方向:

  • 生成的效率会降低,并且生成出来的 SVG 大小会变大。由于拆分也会导致生成图案变丑。
  • 基于概率的拆分,或许会被基于统计的方式攻破。或许不应该将概率做成配置项,而是应该完全随机。
    • 拆分所生成的点可能有特征。
    • 每 L 或 Q 只会被拆分一次,可能应该改成有一定概率多次拆分。
  • 由于拆分导致线条不连贯,如果逐点扰动对图案质量有显著影响(但是我不觉得对 SVG 图像进行逐点扰动有什么价值。同样的,噪点与横贯线条在 SVG 里也易于识别)。

Randomly split the straight line (L) and the quadratic Bezier curve (Q) so that the commands generated by each letter is different each time.

Potential problems or improvements:

  • The generation efficiency will be reduced, and the size of the generated SVG will become larger. The resulting pattern will also become ugly due to splitting.
  • Probability-based splits may be attacked by statistics. Perhaps the split probability should not be a configuration, but should be completely random.
       - The points generated by the split may have features.
       - Each L or Q will only be split once, probably multiple splits should be allowed.
  • Due to the inconsistent lines caused by splitting, point-by-point perturbation has a significant impact on the quality of the pattern

@ghost
Copy link

ghost commented Feb 6, 2021

I guess it is crackable too. Just render SVG to PNG and process it through some algorithm for matching characters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

This program has been cracked, please fix it
1 participant