Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Users
    • Groups
    • Solved
    • Unsolved
    • Search
    1. Home
    2. habakuk
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    habakuk

    @habakuk

    0
    Reputation
    11
    Posts
    271
    Profile views
    0
    Followers
    1
    Following
    Joined Last Online
    Website www.instagram.com/das_habakuk/ Location Bern, Schweiz

    habakuk Follow

    Best posts made by habakuk

    This user hasn't posted anything yet.

    Latest posts made by habakuk

    • RE: How to mirror/flip a object?

      Hallo @jo thanks alot - at the moment i use the lissajus only to create different nice looking loops. I changed the values as you suggested and of course it is working now and delivers a new nice looking loop. 😉
      I`d love to make some more loops with more "natural, subtle and slow" movements. I saw your great visualisations of the different variable font movements and hoped to create a custom path to do so - but i failed...

      if you like to play around with my very first 5 letter variable font (HABKU) you are very welcome. http://habaland.ch/images/habaroll8GX.ttf

      i added the the plus and minus to avoid the font doing the whole move to the min and max, because the backgraound would be visible then. (but most likely i created only a mess 😄 ) and by the way, i hate the black circle i had to ad "behind the scene" - id love o have a cleaner solution.

      ...at the moment i am trying to figure out where to append the savedState() without messing everything up...

      greetings from Bern

      posted in General Discussion
      habakuk
      habakuk
    • RE: How to mirror/flip a object?
      # --------------------------
      #  imports
      
      import sys
      sys.path.append("..")
      from helper_functions import *
      
      # --------------------------
      #  settings
      
      p_w, p_h = 1000, 1000
      margin = 40
      dia = 4
      steps = 600
      
      # lissajous values
      a = 2 # 2, 3, 4 are decent values
      b = a + 1
      delta = 0 # pi/2, pi/3, pi/4
      
      f_name = "habaroll8"
      
      axes = ['wght', 'wdth'] 
      
      # --------
      axis1_min = listFontVariations(f_name)[axes[0]]['minValue']
      axis1_def = listFontVariations(f_name)[axes[0]]['defaultValue']
      axis1_max = listFontVariations(f_name)[axes[0]]['maxValue']
      
      axis2_min = listFontVariations(f_name)[axes[1]]['minValue']
      axis2_def = listFontVariations(f_name)[axes[1]]['defaultValue']
      axis2_max = listFontVariations(f_name)[axes[1]]['maxValue']
      
      
      axis_w = p_w - 2 * margin
      axis_h = p_h - 2 * margin
      
      def_x = map_val(axis1_def, axis1_min, axis1_max, 0, axis_w)
      def_y = map_val(axis2_def, axis2_min, axis2_max, 0, axis_h)
      
      # --------------------------
      #  functions 
      
      def a_page():
          newPage(p_w,p_h)
          fill(1)
          rect(0, 0, p_w, p_h)
          translate(margin, margin)
      
          fill(0.92, 0.90, 0.87)
          rect(0, 0, axis_w, axis_h)
      
          font(f_name)
          fontSize(820 )
      
      
      # --------------------------
      #  Drawings 
      
      pts = []
      for st in range(steps):
      
          # newDrawing()
          a_page()
      
          angle = 2 * pi / steps * st
      
          x = .5 + .5 * sin( a * angle + delta )
          y = .5 + .5 * sin( b * angle )
      
      
      
          curr_axis1 = ip(axis1_min + 20, axis1_max - 20, x)
          curr_axis2 = ip(axis2_min + 20, axis2_max - 20, y)
          var_values = { axes[0] : curr_axis1, axes[1] : curr_axis2 }    
          fontVariations(**var_values)
          
          #black ring to avoid the background "bleed through"
          fill(None)
          stroke(0)
          strokeWidth(60)
          oval(125, 95, 700, 700) 
          
          # the black part (fake 3D)
          stroke(0)
          strokeWidth(4)
          fill(0)
          text('A', (axis_w/2, axis_h/8), align = 'center') 
          
          # the pink blob letter
          stroke(None)
          fill(0.79, 0.52, 0.67)
          scale(x=1.25, y=1.25)
          translate(x=-95, y=-80)
          text('A', (axis_w/2, axis_h/8), align = 'center') 
          
          # the blob shadow (would be great to have the shadow behind the pink blob!) 
          fill(0)
          translate(-120, 110)
          scale(x=0.9, y=-.05)
          skew(25, 0)
          rotate(-3)
          text('A', (axis_w/2, axis_h/8), align = 'center') 
      
      
        
      saveImage('lissajous_var_test12.gif')
      
      
      posted in General Discussion
      habakuk
      habakuk
    • RE: How to mirror/flip a object?

      Hey @jo - thank you very much! That was the issue - damn, i am still in trouble with the the basics. Actually i am pretty stoked to have you here responding, because i am messing around with your code... 😉 i`d love to ad different lissajous curves to my blobbish letters, and i hoped changing the numbers (a = 2 # 2, 3, 4 are decent values) would do the trick - but it does not really change that much - sometimes even the loop is not longer working. Would you mind having a look at my codemess? (i mean, your code - and my mess 😄 )

      A-Blob

      posted in General Discussion
      habakuk
      habakuk
    • RE: How to mirror/flip a object?

      Hello @ricardov Yes, i tried negative scaling, but it gives no result. It gives no error, but there is also nothing happening...

      posted in General Discussion
      habakuk
      habakuk
    • RE: How to mirror/flip a object?

      My goal is to draw a shadow, so I have to mirror the letter. (i achieved scaling, skewing, but not flipping)

      newPage(1000, 1000)
      
      font('Skia')
      fontSize(600)
      fill(0.79, 0.52, 0.67)
      text('A', (300, 200))
      fill(0)
      scale(x=1, y=0.05)
      text('A', (300, 800))
      
      posted in General Discussion
      habakuk
      habakuk
    • How to mirror/flip a object?

      Hello World, i have a struggle on a very simple task - how can i mirror/flip a bezier path object (or a text) horizontal and vertical?

      thanks in advance

      posted in General Discussion
      habakuk
      habakuk
    • RE: stuck in the code

      Hello @gferreira

      I know how to move the blob and the hole separately. (Last example in my first post) My question is, if there is any way to move a group of objects together? I like to have a blob with several holes that act as one object? (If I change the movement of the blob, the holes will change too).

      Sorry, my english is not very good ...

      posted in Code snippets
      habakuk
      habakuk
    • RE: stuck in the code

      Hello @michelangelo

      Thank you very much, your code is very inspiring. I played around and it moves just how it should - except the "hole". Can the hole somehow act related to the blob and move just as it would be a part of the blob? (clipping?)

      michelangelo_blob2s.gif

      # Define a function to draw your shape
      def Blob(offset):
          
          # Let's make a Bezier Path shape
          bez = BezierPath()
          bez.qCurveTo((80 + offset, 80 + 0.2 * offset), (80 + offset, 920 + 0.8 * offset), (920 + 0.1 * offset, 920 + 0.3 * offset), (920 + 3 * offset, 80 + 0.5 * offset), None)
          # Here I make Another shape, but it's going the opposite direction
          bez.moveTo((700, 300))
          bez.lineTo((700, 700))
          bez.lineTo((300, 700))
          bez.lineTo((300, 300))
          bez.closePath()
          fill(0.79, 0.52, 0.67)
          stroke(None)
          drawPath(bez)
          translate(60, 15)
          scale(x=0.8, y=0.03)
          fill(0)
      
          # Drawing the shape here
          drawPath(bez)
          
      numFrames = 60
          
      for i in range(numFrames):
          t = i / numFrames
      
          newPage(1000, 1000)
          fill(0.92, 0.90, 0.87)
          stroke(1)
          strokeWidth(80)
          rect(0, 0, 1000, 1000)
      
          
          
          
          # The function takes an argument "offset" to create the movement (it loops at * 50, * 25 * 12.5, * 6.25, 3.125
          offset = sin(t * 12.5) * 10
          print(offset)
          Blob(offset)
      
      saveImage("michelangelo_blob2.gif")
      
      posted in Code snippets
      habakuk
      habakuk
    • RE: stuck in the code

      @michelangelo @michelangelo Heyho! Thank you so much for responding 🙂 I had a whole mess of code in here, after a month or so with no reaction i deleted it - i felt ashamed, i thought my code mess must look hopeless to you guys. i will have a look at your example, and reupload some bits and pieces. Greetings

      posted in Code snippets
      habakuk
      habakuk
    • RE: stuck in the code

      ...beneath the "counter/holes" i am trying hard, to animate each cornerpoint (off line point) of the qcurve-path seperatly, to get e more irregular movement. I am open to every new inspiration from you guys, thanks in advance.

      posted in Code snippets
      habakuk
      habakuk