 # Trying to understand the logic in image mapping

I was searching for various image mapping techniques and I found this script in my laptop. I have not made it. I probably got it from this forum. The logic behind the lines being made in the Y-axis is pretty straightforward.

I am unable to figure out what exactly is happening along X-axis in the encircled portion.

image mapping query.gh (1.8 MB)

Black and white image probably output values from 0-1,
This code use these values to move points along x axis as multiplication of black/white values plus addition of current line x position.

Okay. I’ll make my queries more specific.

How were the numbers decided initially in the blue highlighted box?

What function is the multiplication component performing?

Why were one of the end point for every curve was taken to perform the scaling along x axis instead of the centre point?

let’s say the following stripe is a random one on Messi’s portrait, which comprehends a 0 bright reading and a 1 bright reading:

assuming the “Scale X” (third) slider is at 1.00 then:

the A value means “how much thick should the stripe be where we are at 100% brightness”

the B value means “how much thickness should be added to each point of the stripe, regardless of its brightness value”

the third slider (scale X) is a weird one, because it scales-x each stripe based on the position of its very first thickness point:

this thing does not really make a lot of sense in my mind… I would change it in such a way it scales-x the whole stripe thickness on its original base point, like the following, in such a way this equally controls all the stripes to become a bit thinner or thicker

btw, because we don’t really know where this definition comes from, it might be that scale-x done on that point served a particular reason… who knows 1 Like

Thanks a lot! Now I am understanding. However, I don’t understand the logic of scaling. Scaling essentially multiplies a number with the width and scales it along the x-axis. We are already doing that in the beginning here.

I removed the scale Nu component and inserted the interpolated curve directly in the ruled surface component. The output still looks good. Does this mean that scaling is not required?

agree let’s say the final x-scaling is just a fast way to modify the behavior of the whole stripes depending on the base-point you use for the scaling

for instance, using the blue point (last observation in my previous post) you make the whole stripe thinner or thicker (A and B values will not be respected anymore, only their ratio will be respected)

while using the red point (as in the original definition) you flatten the peaks and the valleys making the curve look more live a vertical line with Xvalue = Xvalue of the red point

Okay. Thanks!