It is currently Thu May 23, 2013 10:19 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: the mysterious skull painting (code)
PostPosted: Thu May 31, 2012 11:34 am 
Offline
Enthusiast
Enthusiast

Joined: Sun Jun 25, 2006 7:28 pm
Posts: 227
it is called The Ambassadors:
http://en.wikipedia.org/wiki/The_Ambassadors_(Holbein)
Image
look at the bottom there are something like a plate, but it is a tilted 2D skull with regard to the viewer outside, and if you enter the Ambassador room you can look at the object and see this 2D skull.
i am sure the tilted or rotated objects are related to the matrix math like the OpenGL math. but i find it easier to imagine it as a compressed object (wich may be also have relations to matrices?!!!).
so we can resize the skull image vertically by 5 to see it semi normally.
attached the skull picture before resizing (after rotating it) :
Image
and after resizing:
Image
i have used the image.pb from the pb examples folder to display and resize vertically the image
Code:
UseJPEGImageDecoder()
UseJPEGImageEncoder()

If OpenWindow(0, 0, 0, 640, 480, "Image Resize")

  If CreateImage(0, 416, 304)
    StartDrawing(ImageOutput(0))
    file$= "skull.jpg"
    LoadImage(0, file$)
    StopDrawing()
  EndIf
  ResizeImage(0, 416, 304)
  CopyImage(0, 1)
  ResizeImage(1, 100, 500)
 
  Repeat
    EventID = WaitWindowEvent()
    If EventID = #PB_Event_Repaint
      StartDrawing(WindowOutput(0))
        DrawImage(ImageID(0), 20, 10)
        DrawImage(ImageID(1), 440, 0)
      StopDrawing()   
    EndIf
  Until EventID = #PB_Event_CloseWindow
 
EndIf

End


Top
 Profile  
 
 Post subject: Re: the mysterious skull painting (code)
PostPosted: Thu May 31, 2012 11:53 pm 
Offline
Enthusiast
Enthusiast

Joined: Mon Jun 09, 2003 10:08 pm
Posts: 635
Location: Nottingham
I have been experimenting with applePi's program but had a problem as it kept crashing. Below is a extract from my code, just sufficient to show the problem.
Code:
EnableExplicit

Enumeration
  #imgAmbassadors
  #imgClipped
EndEnumeration

Define wclip, hclip

UseJPEGImageDecoder()
LoadImage(#imgAmbassadors, "skull.jpg")
wclip = 330: hclip = wclip/2
GrabImage(#imgAmbassadors, #imgClipped, 112, ImageHeight(#imgAmbassadors)-hclip, wclip, hclip)
StartDrawing(ImageID(#imgClipped))
StopDrawing()
Every time I run this code (with debugger on) it crashes on the StartDrawing() line with the error message "Invalid memory access (read error at address ...)"
I am using Windows 7 and PureBasic 4.61 final. Is this a Windows bug or am I doing something wrong?

_________________
Anthony Jordan


Top
 Profile  
 
 Post subject: Re: the mysterious skull painting (code)
PostPosted: Fri Jun 01, 2012 2:10 am 
Offline
Addict
Addict

Joined: Tue Feb 22, 2011 1:16 pm
Posts: 1459
Looking at the painting, is that skull supposed to be hidden or subliminal or something? Because it's so damn obvious what it is, and how out of place it looks. I knew it was a squashed skull even before I read your text, and thought it was something you had just pasted onto the image.

I guess people back then were more easily fooled. :lol:

_________________
Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!


Top
 Profile  
 
 Post subject: Re: the mysterious skull painting (code)
PostPosted: Fri Jun 01, 2012 2:13 am 
Offline
Addict
Addict
User avatar

Joined: Fri Sep 21, 2007 5:52 am
Posts: 2487
Location: New Zealand
as a guess

Quote:
Result = GrabImage(#Image1, #Image2, x, y, Width, Height)


Code:
EnableExplicit

Enumeration
  #imgAmbassadors
  #imgClipped
EndEnumeration

Define wclip, hclip

UseJPEGImageDecoder()
LoadImage(#imgAmbassadors, "skull.jpg")
wclip = 330: hclip = wclip/2
result = GrabImage(#imgAmbassadors, #imgClipped, 112, ImageHeight(#imgAmbassadors)-hclip, wclip, hclip)
StartDrawing(ImageID(result))
StopDrawing()


Top
 Profile  
 
 Post subject: Re: the mysterious skull painting (code)
PostPosted: Fri Jun 01, 2012 6:42 am 
Offline
Addict
Addict
User avatar

Joined: Tue Nov 13, 2007 12:42 pm
Posts: 1307
Location: Manchester, UK
MachineCode wrote:
Looking at the painting, is that skull supposed to be hidden or subliminal or something?

It appears that it was for people who just walk into the room with the people at a very tight angle to the painting, and they would see a normal shaped skull and freak out, until they tried to get a better look at the painting.

Some people call it a mystery.

I call it taking advantage of optical illusions to promote the image further, and get people to look closely at it.


Top
 Profile  
 
 Post subject: Re: the mysterious skull painting (code)
PostPosted: Fri Jun 01, 2012 2:48 pm 
Offline
PureBasic Bullfrog
PureBasic Bullfrog
User avatar

Joined: Wed Jul 06, 2005 5:42 am
Posts: 6465
As the Wikipedia article reports, one popular view is that the painting was made to be hung in a stairwell, where people climbing the steps with the painting just to their left would be startled by a perfect 3D skull staring at them. Seems as likely an explanation as any. Pretty cool stuff for 1533 though!

@Akj: Should be StartDrawing(Imageoutput( instead of StartDrawing(ImageID(

_________________
Veni, vidi, vici.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye