Projection of a plane onto a cylinder

杀马特。学长 韩版系。学妹 提交于 2019-11-30 18:11:13

Let say you have a rectangle image of lenght: L and height: H .

and a cylinder of radius : R and height H'

Let A (x,z) be a point in the picture,

Then A' (x',y',z') = ( R*cos(x*(2Pi/L)) , R*sin(x*(2Pi/L)) , z*(H'/H)) will be the projection of your point A on your cylinder.

Proof :

1. z' = z*(H'/H)

I first fit the cylinder to the image size , that's why I multiply by : (H'/H), and I keep the same z axis. (if you draw it you will see it immediatly)

2. x' and y ' ?

I project each line of my image into a circle . the parametric equation of a circle is (Rcos(t), Rsin(t)) for t in [0,2PI], the parametric equation map a segment (t in [0,2PI]) to a circle . That's exactly what we are trying to do.

then if x describes a line of lenght L, x*(2pi)/L describres a line of length 2pi and I can use the parametric equation to map each point of this line to a circle.

Hope it helps


The previous function gave the function to "press" a plane against a cylinder.

This is a bijection, so from a given point in the cylinder you can easily get the original image.

A(x,y,z) from the cylinder

A'(x',z') in the image :

z' = z*(H/H')

and x' = L/(2Pi)* { arccos(x/R) *(sign(y)) (mod(2Pi)) }

(it's a pretty ugly formula but that's it :D and you need to express the modulo as a positive value)

If you can apply that to your cylindrical image you get how to uncoil your picture.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!