[ home / rules / faq ] [ overboard / sfw / alt ] [ leftypol / siberia / hobby / tech / edu / games / anime / music / draw / AKM ] [ meta / roulette ] [ cytube / git ] [ GET / ref / marx / booru ]

/tech/ - Technology

"Technology reveals the active relation of man to nature" - Karl Marx
Name
Email
Subject
Comment
Flag
File
Embed
Password (For file deletion.)

Join our Matrix Chat <=> IRC: #leftypol on Rizon
Please give feedback on proposals, new on Mondays : /meta/
New /roulette/ topic: /spoox/ - Paranormal, horror and the occult.
New board: /AKM/ - Guns, weapons and the art of war.


File: 1642094355213.png (244.3 KB, 420x279, ClipboardImage.png)

 No.12992

Anyone here make stuff like this? Pic related is MC Escher, I'd like to try to create something like this. Can anyone point me in the right direction, what should I be researching? GANs? NNs?

 No.12993

SICP's picture language: https://mitpress.mit.edu/sites/default/files/sicp/full-text/book/book-Z-H-15.html#%_sec_2.2.4

Is there any modern LOGO implementations? I remember drawing fractals in that, it was fun.

Maybe you can play around with processing, I never used it though: https://processing.org/

> GANs? NNs?

lol no you don't need any bullshit like that for something this simple.

 No.12994

File: 1642118904948.png (5.26 KB, 400x400, image.png)

Seems to be this kind of tiling, in cairo with a placeholder tile.
class FreeOver_tile (FreeOver):
   def draw (self, ctx, width, height):
      tw, th = 60, 60
      data   = None
      one    = self.tile_one

      for x, y in self.tile_locations (width, height, tw, th):
         one (ctx, x, y, tw, th, data)

   def tile_locations (self, cw, ch, tw, th):
      halfth = th // 2
      xd, xm = divmod (cw, tw)
      yd, ym = divmod (ch + halfth, th)
      xn     = xd + (1 if xm > 0 else 0)
      yn     = yd + (1 if ym > 0 else 0)
      ryn    = range (yn)
      offset = 0

      for xk in range (xn):
         for yk in ryn:
            yield (xk * tw, yk * th - offset)
         offset = halfth - offset

   def tile_one (self, ctx, x, y, w, h, somedata):
      dx, dy = 3, 3

      kgeo.Path.polyline (
         ctx,
         [(x + dx, y + h / 2),
          (x + w - dx, y + dy),
          (x + w - dx, y + h - dy)],
         True)

      ctx.set_source_rgb (0, 1, 0)
      ctx.stroke ()

 No.12995

You can do this:
pre { clear: both; }

>>12594

 No.12997

File: 1642132901728.png (90.77 KB, 700x500, image.png)

With U+1F54A 🕊 Dove of Peace.
class FreeOver_tile (FreeOver):
   def draw (self, ctx, width, height):
      tiledata = self.tile_data ()
      tw       = tiledata ["width" ]
      th       = tiledata ["height"]
      data     = tiledata ["data"  ]
      one      = self.tile_one

      for x, y in self.tile_locations (width, height, tw, th):
         one (ctx, x, y, tw, th, data)

   def tile_data (self):
      return {
         "width":  60,
         "height": 60,
         "data":   None,
      }

   def tile_locations (self, cw, ch, tw, th):
      halfth = th // 2
      xd, xm = divmod (cw, tw)
      yd, ym = divmod (ch + halfth, th)
      xn     = xd + (1 if xm > 0 else 0)
      yn     = yd + (1 if ym > 0 else 0)
      ryn    = range (yn)
      offset = 0

      for xk in range (xn):
         for yk in ryn:
            yield (xk * tw, yk * th - offset)
         offset = halfth - offset

   def tile_one (self, ctx, x, y, w, h, somedata):
      dx, dy = 3, 3

      kgeo.Path.polyline (
         ctx,
         [(x + dx, y + h / 2),
          (x + w - dx, y + dy),
          (x + w - dx, y + h - dy)],
         True)

      ctx.set_source_rgb (0, 1, 0)
      ctx.stroke ()


class FreeOver_tile2 (FreeOver_tile):
   def tile_data (self):
      path = "dove.png"
      surf = cairo.ImageSurface.create_from_png (path)

      return {
         "width":  surf.get_width  (),
         "height": surf.get_height (),
         "data":   {
            "surface": surf
         }
      }

   def tile_one (self, ctx, x, y, w, h, somedata):
      ctx.save ()
      ctx.translate (x, y)
      ctx.set_source_surface (
         somedata ["surface"], 0, 0)
      ctx.paint ()
      ctx.restore ()

 No.13001

https://en.wikipedia.org/wiki/Tessellation
Love2D can be nice, pretty easy to come up with generative "doodles" with it

 No.13005

File: 1642191952125.png (1.67 MB, 1000x792, ClipboardImage.png)

How would you guys generate a Jackson Pollock painting?

 No.13006

File: 1642194559536.png (5.12 MB, 640x480, image.png)

pan of >>12997

 No.13009

File: 1642210041048.png (Spoiler Image, 10.53 MB, 640x480, image.png)

dove tiling pan fizzbuzz

no space in chunk cache → Spoiler Image >>12830


Unique IPs: 5

[Return][Go to top] [Catalog] | [Home][Post a Reply]
Delete Post [ ]
[ home / rules / faq ] [ overboard / sfw / alt ] [ leftypol / siberia / hobby / tech / edu / games / anime / music / draw / AKM ] [ meta / roulette ] [ cytube / git ] [ GET / ref / marx / booru ]