Coder Social home page Coder Social logo

Example for distorted surfaces about xrt HOT 2 CLOSED

brttmnl avatar brttmnl commented on June 24, 2024
Example for distorted surfaces

from xrt.

Comments (2)

kklmn avatar kklmn commented on June 24, 2024

Hi,

If you haven't done so yet, please uncomment see_the_bump() at the very end of the script and comment main() out. You will see the surface and some random samples that are put on the surface. Their color is given by z coordinate and it matches the surface color around them, so that most of these spots you don't even see. The gradient vectors also always directed from high to low values. So the interpolation does look correct.

It is another issue that you probably don't understand the implementation, but to call it incorrect, you should provide an evidence. What is it?

from xrt.

brttmnl avatar brttmnl commented on June 24, 2024

Ah ok, you do the transformation for local coordinates to array index using
coords = np.array( [(x-self.limPhysX[0]) / (self.limPhysX[1]-self.limPhysX[0]) * (self.warpNX-1),
(y-self.limPhysY[0]) / (self.limPhysY[1]-self.limPhysY[0]) * (self.warpNY-1)])
Then it fits.

I implemented a parabolic mirror with distortion, which then needed different coordinate transformations (parametric surface) and the usage of RegularGridInterpolator was more straight forward.
Thanks

from xrt.

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.