Code Monkey home page Code Monkey logo

Comments (4)

jiupinjia avatar jiupinjia commented on May 20, 2024 1

Hi yggs1401, thanks for your good question. The concat for imgtile is a small trick for building skybox image. In theory, a skybox should have no boundaries. When building a skybox using a single background sky image, say, the "./skybox/jupiter.jpg", we need to relocate the center of the camera-view to the top-left corner of the background image. This is because, when we are performing the affine transform, the origin of the transformation is at the upper left corner of the image. We need to make such an alignment. If you show the background image after the tile, it would be like the following.
This operation may look a little bit tricky but it does simply the warping a lot. Hope the above explanation will address your concern.

WeChat Screenshot_20201119141224

from skyar.

jiupinjia avatar jiupinjia commented on May 20, 2024 1

Thank you for your answer! The origin of the affine transformation is always on the top left corner? Another question is, we apply the transformation matrix on all pixels or just on the origin?

Thank you!

Yes, the origin of an affine transform should be always in the top left corner. Let's say if you want to rotate an image for a certain degree. If you simply apply a rotation matrix to the image data, the rotation would be performed based on the upper left corner of the image, rather than the image center.
The second question. We apply the transform to all pixels.

from skyar.

yggs1401 avatar yggs1401 commented on May 20, 2024

Thank you for your answer! The origin of the affine transformation is always on the top left corner? Another question is, we apply the transformation matrix on all pixels or just on the origin?

Thank you!

from skyar.

yggs1401 avatar yggs1401 commented on May 20, 2024

Thank you! Kind regards and stay safe!

from skyar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.