Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Users
    • Groups
    • Solved
    • Unsolved
    • Search
    1. Home
    2. Code snippets
    Log in to post

    Code snippets

    • Collinearity of points
      collinearity area math triangles • • erik  

      3
      1
      Votes
      3
      Posts
      1526
      Views

      That animation of the KABK crown I did: was looking into this question so as to avoid having to define the collinear = invalid segments explicitly — having the code test the combinations is a more elegant solution. https://twitter.com/MauriceMeilleur/status/973090865882296325
    • Cellular automaton
      • jo  

      4
      2
      Votes
      4
      Posts
      2028
      Views

      @jo Beautiful!!!
    • A grid of animated spirals
      • justvanrossum  

      1
      1
      Votes
      1
      Posts
      2107
      Views

      No one has replied

    • Nested loops for 2d matrix pattern
      grid • • roberto-arista  

      1
      2
      Votes
      1
      Posts
      1421
      Views

      No one has replied

    • Sliced Sphere
      • justvanrossum  

      1
      5
      Votes
      1
      Posts
      2451
      Views

      No one has replied

    • Blobs 101?
      bezierpath animation pens qcurve • • agyei  

      8
      1
      Votes
      8
      Posts
      2990
      Views

      I mean to do so at some point—probably on GitHub, probably this summer when I can take a little time to clean up code and organize the sketches.
    • Possible solution to Just's puzzle?
      • erik  

      9
      1
      Votes
      9
      Posts
      2686
      Views

      An example with blendMode("lighten") and radialGradient() building on @justvanrossum example. size(1000, 1000) fill(0) dia = 864 offset = 120 rect(0, 0, width(), height()) d = 1200 blendMode("lighten") radialGradient((350-offset, 750+offset), (350-offset, 750+offset), [(1,), (0,)], startRadius=5, endRadius=0.7*dia) oval(350-.5*d, 750-.5*d, d, d) radialGradient((650-offset, 250+offset), (650-offset, 250+offset), [(1,), (0,)], startRadius=5, endRadius=0.35*dia) oval(650-.5*d, 250-.5*d, d, d)
    • Excellent 3D Monsters
      text transformations • • erik  

      1
      1
      Votes
      1
      Posts
      1240
      Views

      No one has replied

    • Drawing colors with colorsys
      color • • erik  

      1
      3
      Votes
      1
      Posts
      1217
      Views

      No one has replied

    • Recursive Tree example
      • justvanrossum  

      4
      1
      Votes
      4
      Posts
      2307
      Views

      This is 20 levels deep. It took a while
    • Seigaiha Pattern
      recreations • • justvanrossum  

      1
      2
      Votes
      1
      Posts
      2484
      Views

      No one has replied

    Drawing With Python