Close

Veel Dank

A project log for Malleo Magicis

The Magic Hammer A Collection of Synaesthetic art and music painted, composed, arranged and recorded by Jez 'HexHammer' Boxall.

morningstarMorning.Star 05/25/2017 at 09:172 Comments

Hackaday is a great place for inspiration.

Following my joining of #Internet of Condoms, I've begun a series of pop art pieces, meme styled and drawing on the dankness of the hardcore HaD culture I've encountered as a result.

'Hackers' XD

I love these halls. I can roam with my skin off and nobody minds, where I felt naked in the Book of Faces. And there's little to write about, or paint. Sport, politics, not my thing. Kim Kardashian, lol, even my display isnt wide enough to paint that...



Born To Roll

Not even the great @ActualDragon will tell me why 'Rick', but this is how he rolls. Deal with it :-)


Optimus Yann

@Yann Guidon / YGDES's energetic style and passion led to some bragging about the size of his dataset in HackChat.

"Here's a large Prime for you"


Internet Of Horn

@Arsenijs also didnt do a very good job of keeping his head below the parapet; @Debargha Ganguly described us as a unicorn company.

Arsenijs: "We are now =D


Future Mucha

This one is a little different.

Legendary tattooist @David I. Herman and his partner in crime @Blake Ramsdell put a series of paintings together and etched them on circuit boards using @oshpark's service for the final art.

Doz's paintings rendered in copper are stunning.

'Origambee' was inspired by my work with #Cardware, and the name @Morning.Star was taken from one of the other pieces. Morning Star is the name for Venus when it rises in the East. ;-)

Rendered to look like a tattoo, one of Mucha's Seasons as Muse.

For Doz, thank you :-)


Flying Ostrich

Not everything works as well as I envision it. @benchoff posted a new project for his Gerber files named somewhat bizarrely as Flying Ostrich, and there was a small incident in Hackchat...

I havent seen this image since I was 12 years old, it's a small piece of an Escher mural that my maths teacher had printed on a strip of paper that bordered the entire maths room. I detested maths at school, and spent a good deal of time staring at the images as they morphed into each other. This bit has angel-fish in the holes between the birds. I have also seen that lemon-yellow and white before somewhere. Hmmm...

Escher drew a series of still-life drawings of metal spheres, containing reflections of him and his study among other things, including the face of an ostrich. Ahah, time for a bit of fun then.

The idea behind the piece is a jet reflected in the ostrich's eye, mathematically perfect as only Escher could. It isnt clear however from the finished work just what goes into it:

The jet is an outline I created in Inkscape from a reference photo. What I needed was a curved reflection of it that fits in the eye, so I applied a bit of maths to it.

from math import cos,sin,atan as atn, sqrt as sqr
from PIL import Image

pi=atn(1)*4     # get pi to machine resolution
d2r=pi/180      # degrees to radians
r2d=180/pi      # radians to degrees

def angle(sx,sy):                       # simple universal polar conversion
  if sx<>0: a=float(atn(abs(float(sy))/abs(float(sx)))*r2d) # theta = arctan opposite/adjacent
  if sx==0 and sy==0: a=0.0             # make sure infinity doesnt get in the way
  if sx>0 and sy==0: a=0.0
  if sx<0 and sy==0: a=180.0
  if sx==0 and sy>0: a=90.0
  if sx==0 and sy<0: a=270.0
  if sx>0 and sy>0: a=float(a)          # deal with quadrants; ATN returns 0-90 degrees
  if sx<0 and sy>0: a=float(180-a)
  if sx>0 and sy<0: a=float(360-a)
  if sx<0 and sy<0: a=float(180+a)
  return a

def radius(sx,sy):
  r=float(sqr((abs(float(sx))**2)+(abs(float(sy))**2)))   # pythagoras
  return r

srcim=Image.open('jet.png')             # get the source
srcmap=srcim.load()                     # get the source pixmap into an array
W,H=srcim.size                          # get the width and height
maxr=radius(W/2,H/2)                    # get the maximum radius of curve

dilate=60

dstim=Image.new('RGB',(W,H),'black')    # make a new image to hold the curved copy
dstmap=dstim.load()                     # get the dest pixmap into an array
for row in range(H):                    # iterate all rows
  for col in range(W):                  # iterate all columns
    sr,sg,sb,st=srcmap[col,row]         # get the pixel at source col/row
    x=col-(W/2); y=row-(H/2)            # calc the new coordinate of the pixel:
    a=angle(x,y)                        # find the angle from centre
    r=radius(x,y)                       # and the distance
    r2=r*cos(((dilate/maxr)*r)*d2r)     # place distance on a curve
    x=(cos(a*d2r)*r2)+(W/2)             # and integrate it into cartesian coords
    y=(sin(a*d2r)*r2)+(H/2)
    dr,dg,db=dstmap[x,y]                # get the pixel at the new position
    tr=sr|dr                            # binary-or the two together
    tg=sg|dg
    tb=sb|db
    dstmap[x,y]=(tr,tg,tb)              # and write the new pixel to the dest

dstim.save('jet_curved.png')            # save the curved image
Which resulted in the following image.

That composited with other parts after painting...

Using this code.

from PIL import Image

srcim1=Image.open('jet_eye.png')         # get the source
srcmap1=srcim1.load()                    # get the source pixmap into an array
W,H=srcim1.size                          # get the width and height
srcim2=Image.open('bird.png')            # get the 2nd source
srcmap2=srcim2.load()                    # get the pixmap into an array

dstim=Image.new('RGBA',(W,H),'black')    # make a new image to hold the curved copy
dstmap=dstim.load()                      # get the dest pixmap into an array
sr,sg,sb,st=srcmap1[0,0]
tst=(sr,sg,sb)
for y in range(H):                       # iterate all rows
  for x in range(W):                     # iterate all columns
    sr,sg,sb,st=srcmap1[x,y]             # get the pixels at source col/row
    tr,tg,tb,tt=srcmap2[x,y]
    if (sr,sg,sb)!=tst: tr=sr; tg=sg; tb=sb # fix the transparency
    dstmap[x,y]=(tr,tg,tb,(((tr,tg,tb)!=tst)*255)  # and write the new pixel to the dest

dstim.save('ostrich.png')                # save the composited image

Producing the final image. Escher of course was able to draw his ostrich from life using a pencil. I had to bend the rules a little to make mine...

Discussions

Yann Guidon / YGDES wrote 05/25/2017 at 13:19 point

What a gallery !

Thanks for sharing :-)

  Are you sure? yes | no

Morning.Star wrote 05/25/2017 at 23:57 point

Autobots assemble! They also compile, construct and design, and the odd one paints. ;-)

Happy to add new parts to the collection my friend.

  Are you sure? yes | no