Navigation

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

    • KevinKarney

      SOLVED Newby request
      General Discussion • bezierpath geometry boolean operations • • KevinKarney  

      2
      0
      Votes
      2
      Posts
      185
      Views

      gferreira

      hello @KevinKarney, welcome to DrawBot! 1. I need the option to build compound objects (with unions, differences, intersections). Is it possible to make (e.g) a torus by differencing 2 circles. Or do I have to create two bezier paths and then do the difference. both methods are possible: you can do it with a single BezierPath by drawing two circles in opposing directions: x, y = 500, 500 r1 = 400 r2 = 300 B = BezierPath() B.oval(x-r1, y-r1, r1*2, r1*2) B.reverse() B.oval(x-r2, y-r2, r2*2, r2*2) fill(0, 1, 0) stroke(1, 0, 0) strokeWidth(10) drawPath(B) or you can draw two separate circles, and get the difference between them: B1 = BezierPath() B1.oval(x-r1, y-r1, r1*2, r1*2) B2 = BezierPath() B2.oval(x-r2, y-r2, r2*2, r2*2) B3 = B1.difference(B2) drawPath(B3) 2. with primitives such as oval or rect, can I incorporate the fill, stroke, strokewidth, etc into the call. In Nodebox 1, I can say (e.g) a = rect(0,0,20,20,stroke=Red,strokewidth=3,fill=Grey, draw=False) This creates an object call a, but does not draw it.... grouping colors and geometry can be done with functions: def a(): stroke(1, 0, 0) strokeWidth(3) fill(0.5) rect(0, 0, 20, 20) a() hope this helps… have fun with the movies, and let us know if you have any other questions.
    • mrrouge

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

      5
      0
      Votes
      5
      Posts
      355
      Views

      mrrouge

      thanks @}->--
    • mrrouge

      SOLVED Moving Anchor point of a Primitive to its middle ?
      General Discussion • transformations geometry • • mrrouge  

      3
      0
      Votes
      3
      Posts
      346
      Views

      mrrouge

      thanks a lot
    • FutureDays

      SOLVED Changing Squares to Five Point Stars with JVR Code
      General Discussion • animation geometry • • FutureDays  

      6
      0
      Votes
      6
      Posts
      707
      Views

      FutureDays

      @gferreira Hello gferreira, Thank you so much the reply has been very helpful. I can see that I was thinking too much about modifying all areas of the code instead of changing a small component. Enjoy the day. Best. Robert
    • jo

      Drawing a circle with Beziers
      Code snippets • bezierpath geometry • • jo  

      1
      2
      Votes
      1
      Posts
      706
      Views

      No one has replied

    • Maarten Renckens

      Grouping paths/elements
      Feature Requests • transformations geometry • • Maarten Renckens  

      3
      0
      Votes
      3
      Posts
      854
      Views

      Maarten Renckens

      @frederik Got it. Thanks!