Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Users
    • Groups
    • Solved
    • Unsolved
    • Search
    1. Home
    2. Recent
    Log in to post
    • All categories
    • Announcements
    • General Discussion
    • Tutorials
    • Code snippets
    • Feature Requests
    • Bugs
    • All Topics
    • New Topics
    • Watched Topics
    • Unreplied Topics

    • ThunderNixon

      SOLVED How do I size an image with the ImageObject (or without)?
      General Discussion • image transformations • • ThunderNixon  

      5
      0
      Votes
      5
      Posts
      381
      Views

      ThunderNixon

      Ahh this is a very clear-headed approach. Thanks for showing me how it's done! This is very helpful.
    • MauriceMeilleur

      UNSOLVED Vector/BezierPath distortion methods?
      General Discussion • bezierpath recreations transformations • • MauriceMeilleur  

      6
      0
      Votes
      6
      Posts
      454
      Views

      MauriceMeilleur

      I suspect there's a way to do it by somehow drawing the straight lines in the glyphs as curves and pulling the off-curve points various distances away from being collinear with the on-curve points, in one direction or another, as I change the position of those on-curve points. But, I still struggle to figure out how to tell which are which, in a list of a curve's points, or to write a set of on-curve and off-curve points to a curve to create a shape on purpose—I know what quadratic and cubic curves are, but the order/syntax of the points in the path escapes me. So it may be a long while before I figure anything out …
    • jo

      More variable fonts nonsense
      Code snippets • animation variable fonts • • jo  

      9
      4
      Votes
      9
      Posts
      1673
      Views

      Christine

      Hoi I’m using OS 10.13.6, Drawbot says ModuleNotFoundError: No module named 'helper_functions' ––– ah, sorry, I just saw that there’s an extra file with the helper functions.
    • snaders

      UNSOLVED Drawbot freezes after running
      Bugs • • snaders  

      5
      0
      Votes
      5
      Posts
      824
      Views

      harbortype

      @frederik I am on Mojave (10.14.5). This is the crash report that comes up after I force quit Drawbot: https://www.dropbox.com/s/4b6gkksm1ti5rnv/Drawbot crash report.txt?dl=0 Not sure if there is another report somewhere else… One other thing I have noticed just now is that if I run the script above and then run a different script, Drawbot will freeze as well. The second script being one that I use daily with zero issues.
    • mrrouge

      UNSOLVED Random Lines with no intersection
      General Discussion • randomness • • mrrouge  

      4
      0
      Votes
      4
      Posts
      449
      Views

      jo

      @mrrouge ok if i got you right you want the function to return a value — in your case the height of the legs. this value could then be used in a while loop. while loops are quite helpful but might run forever if done incorrect. I adapted the code a bit so the legs function returns the length of the legs which is then added to the y value in the while loop. There is a check inside the while loop so it will run for a maximum of 3000 times. # ------------- # settings pw = ph = 500 amount_x = 10 cell_w = pw / amount_x max_h = 50 gap = max_h * .2 # ------------- # fucntion(s) def legs(pos, max_w, max_h): x, y = pos length = random() * max_h step_s = random() * max_w polygon((x - step_s, y) , (x, y + length), (x + step_s, y), close = False) return length # ------------- # drawings newPage(pw, ph) fill(None) stroke(0) strokeWidth(2) for x in range(amount_x): count = 0 y = -random() * max_h while y < ph: y += legs((x * cell_w + cell_w/2, y), cell_w/2, max_h) y += gap count += 1 if count > 3000: break and the while loop without the check: for x in range(amount_x): y = -random() * max_h while y < ph: y += legs((x * cell_w + cell_w/2, y), cell_w/2, max_h) y += gap
    • jo

      Vera Molnar re-coded
      Code snippets • recreations • • jo  

      3
      3
      Votes
      3
      Posts
      378
      Views

      mrrouge

      very cool thanks
    • jo

      Solar eclipse
      Code snippets • • jo  

      1
      0
      Votes
      1
      Posts
      352
      Views

      No one has replied

    • MauriceMeilleur

      SOLVED Overlapping paths
      General Discussion • bezierpath remove overlap • • MauriceMeilleur  

      9
      0
      Votes
      9
      Posts
      539
      Views

      MauriceMeilleur

      I can't say for sure, but just thinking about the editing I'd been doing when I ran into the problem, open paths would be the more likely explanation. Anyway, it's working now—time to move on to new problems.
    • justvanrossum

      Python For Designers online book
      Tutorials • getting started • • justvanrossum  

      1
      2
      Votes
      1
      Posts
      510
      Views

      No one has replied

    • justvanrossum

      Here's a good tutorial for people just starting out with DrawBot
      Tutorials • getting started • • justvanrossum  

      1
      1
      Votes
      1
      Posts
      495
      Views

      No one has replied

    • mrrouge

      SOLVED determine centerpoint in irregular rectangle / create "composition"
      General Discussion • geometry • • mrrouge  

      5
      0
      Votes
      5
      Posts
      355
      Views

      mrrouge

      thanks @}->--
    • mrrouge

      SOLVED Hi can somebody help me randomize shapes within a loop ?
      General Discussion • randomness • • mrrouge  

      3
      0
      Votes
      3
      Posts
      302
      Views

      mrrouge

      Cool thanks for your help ! Iam really struggling to find the right information in the reference