Transform 2d picture of cone (x,y) to (s,phi)

8 views (last 30 days)
Ryan
Ryan on 21 May 2015
Hello all,
I have a 2d image of a cone plotted in cartesian coordinates with an associated intensity value for each pixel. I wanted to reimage the picture in terms of polar coordinates (slant length, azimuthal angle). Here are the equations that I think should be using for the transformation, but I'm stuck from there.
if true
% code
s = sqrt(x^2+y^2) % 's' is the slant length at a particular x,y coordinate
R = s * sin(alpha) % 'alpha' is the half angle of the cone, 'R' is the radius at that slant length
theta = phi * sin(alpha) % 'phi' is the azimuthal angle of the cone, 'theta' is the angle of the rolled out cone
phi = s * theta / R
So for each x,y pixel I can find the slant length, but how do I determine the roll-out angle? This website, page 14, helped with the equations:
Assuming I can find 'phi' do I use an interp function to get the intensities for the new coordinate system? Let me know if I need to be clearer on anything.
Thanks

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!