catransform3d - How do I get the right perspective for the used pattern? iOS Project with Swift3 -


the following image house garage; garage door pattern:

house garage; garage door pattern

the garage door overlaid pattern, how can transform pattern perspectively correct?

this ios/swift3 project i'm working on, using following code

let layer:calayer = self.rectimageview.layer var rotationandperspectivetransform:catransform3d = catransform3didentity rotationandperspectivetransform.m34 = 1.0 / -250 rotationandperspectivetransform = catransform3drotate(rotationandperspectivetransform, self.calculateangleofperspective(), 0.0, 1.0, 0.0) layer.transform = rotationandperspectivetransform 

i'm getting following view garage door wrong perspective:

garage door wrong perspective

can please guide me right direction, how can achieve, seen in upper half of image, instead of lower part? in advance!


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -