Hi ,(adsbygoogle = window.adsbygoogle || []).push({});

I came across a problem ,I've search a lot but couldn't exactly find the solution.

here is my problem:

suppose there is an image ( I call it IMG_A),place IMG_A in the X-Y plane , put a mirror cylinder at the center of IMG_A. what we see in the cylinder mirror is a deform image (I call it IMG_B) . what I try to achieve by this program is IMG_B.

I've already write a piece of code in Matlab using this equation

for i=1:IMG_A_Width

for j=1:IMG_A_Height

cy(i,j,1)=cyradius*cos(i*(2*pi/IMG_A_Width)) ;%cylinder X

cy(i,j,2)=cyradius*(sin(i*(2*pi/IMG_A_Width)));%cylinder Y

cy(i,j,3)=j*(cyHeight/IMG_A_Height) ;%cylinder Z

cy(i,j,4)=IMG_A(i,j);%cylinder image

end

end

but this is not exactly what I want ,this program just wrap the IMG_A around the cylinder. in other words the warping is in the horizontal direction.

would you please be kind enough helping me to understand the equation I need to write this program?

**Physics Forums | Science Articles, Homework Help, Discussion**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# A Project img on X-Y surface to a cylinder placed in center...

Have something to add?

Draft saved
Draft deleted

**Physics Forums | Science Articles, Homework Help, Discussion**