Post Reply 

Map pixels of square to circle

Oct 8, 2013, 20:29
Post: #1
Map pixels of square to circle
I have a square selection that I'd like to map into a circle of equal size. I see apply lens and map object...sphere, but neither of these seem to do a proper job.

The algorithm I'm after would basically take the pixels of the square and map them onto their new locations within the circle so that each pixel moves inward toward the center until it reaches its appropriate location along the the line from the origin to its radius.

Any thoughts?

And if not, can someone point me to the place I would need to write this filter? I'm about to the point to just code it in C++. :-)
Find all posts by this user
Quote this message in a reply
Oct 8, 2013, 21:35
Post: #2
RE: Map pixels of square to circle
(Oct 8, 2013 21:26)ofnuts Wrote:  If you are good at math you could come up with a displace map for a polar displacement.

That will work. Thank you. I see it also handles antialiasing.
Find all posts by this user
Quote this message in a reply
Oct 10, 2013, 22:08 (This post was last modified: Oct 10, 2013 22:09 by foxmuldr.)
Post: #3
RE: Map pixels of square to circle
(Oct 8, 2013 21:35)foxmuldr Wrote:  
(Oct 8, 2013 21:26)ofnuts Wrote:  If you are good at math you could come up with a displace map for a polar displacement.

That will work. Thank you. I see it also handles antialiasing.

I have to correct my post. This solution is insufficient for achieving a proper displacement (such as through fractional pixel displacement, but it only moves a maximum of 128 pixels per displace map). Still looking...
Find all posts by this user
Quote this message in a reply
Oct 11, 2013, 03:53
Post: #4
RE: Map pixels of square to circle
(Oct 11, 2013 00:02)ofnuts Wrote:  No better idea. Brush up your C and tweak the displace map plugin Smile

My C skills are sharp. I will wait until I complete my current project, and then I will write what will likely be called "the graphics plugin" for my planned WideEdit general purpose editor.
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  "Resize" by moving pixels down AdelCraft 1 105 May 21, 2018 06:26
Last Post: paynekj
  Drawing Circle Around Object Rondo 1 136 Apr 7, 2018 20:08
Last Post: paynekj
  black square in the gimp's gimp Elimelech 1 289 Dec 9, 2017 12:26
Last Post: ythgilb
  River Map SneakyAdder 1 282 Oct 28, 2017 06:12
Last Post: ythgilb
  Image Map - update existing image w/links Norkuvich 1 376 Sep 18, 2017 08:16
Last Post: paynekj

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS