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

A Chaos Game with Triangles - Improvements with Transparency and Oversampling #125

Open
KelSolaar opened this issue Dec 16, 2022 · 0 comments

Comments

@KelSolaar
Copy link

Hello,

It is possible to significantly and cheaply improve the rendering of the figures of the A Chaos Game with Triangles notebook by using transparency, smaller marker size and a some oversampling:

def show_walk(vertexes, N=5000):
    "Walk halfway towards a random vertex for N points; show reults."
    Xs, Ys = transpose(random_walk(vertexes, N))
    Xv, Yv = transpose(vertexes)
    plt.plot(Xs, Ys, 'r.', alpha=0.5, markersize=1)
    plt.plot(Xv, Yv, 'bs', clip_on=False)
    plt.gca().set_aspect('equal')
    plt.gcf().set_size_inches(9, 9)
    plt.axis('off')
    plt.show()

image
image

image
image

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

No branches or pull requests

1 participant