YOUR ACCOUNT

Login or Register to post new topics or replies
SpaceRay
SpaceRay

Posts: 12302
Filters: 35
Polar to cartesian and back by Nebukadnezar
http://filterforge.com/filters/10577.html

  Details E-Mail
SpaceRay
SpaceRay

Posts: 12302
Filters: 35
Interesting useful snippet. Like how it is done and is good to learn too.

This can be used to interesting effects.

Thanks very much
  Details E-Mail
Indigo Ray
Adam

Posts: 1442
Filters: 82
Thanks! For some reason, I can't download this filter, but the link in my filter comments works. smile:)
  Details E-Mail
Skybase
2D/3D Generalist

Posts: 4025
Filters: 76
Oh sweet stuff. Can totally use this for tons of awesome.
  Details E-Mail
Nebukadnezar
Posts: 64
Filters: 1
Thx, guys! smile:)

Indigo, I updated it yesterday, because I had mixed up the description of the controls.
Might be that caused your problem.
  Details E-Mail
Morgantao
Can't script

Posts: 2185
Filters: 20
Looks great. Makes me wish I had a clue, so I could use it smile:|
  Details E-Mail
SpaceRay
SpaceRay

Posts: 12302
Filters: 35
Quote
Morgantao wrote:
Looks great. Makes me wish I had a clue, so I could use it


Well, I really have been looking at it, and really the same as you I do not have a clue how to use this inside a filter.

This filter has been done after the Indigo Ray request here

Quote
Indigo Ray wrote:
You can see why I didn't include this feature in the submitted filter. Anyone want to figure out POLAR → CARTESIAN transform with free gradients?


Although I do not know how to use this inside a filter it STILL IS A USEFUL FILTER

You can create weird distorsions

  Details E-Mail
SpaceRay
SpaceRay

Posts: 12302
Filters: 35
another one

  Details E-Mail
SpaceRay
SpaceRay

Posts: 12302
Filters: 35
Here is a close up of a tulip flower through this filter

  Details E-Mail
SpaceRay
SpaceRay

Posts: 12302
Filters: 35
Can convert a circular shape into a linear shape

  Details E-Mail
SpaceRay
SpaceRay

Posts: 12302
Filters: 35
one more

  Details E-Mail
SpaceRay
SpaceRay

Posts: 12302
Filters: 35
another

  Details E-Mail
SpaceRay
SpaceRay

Posts: 12302
Filters: 35
Can convert a circular shape into a linear shape AND linear shapes into curves (you can see how the white frame has been converted smile:D )

  Details E-Mail
SpaceRay
SpaceRay

Posts: 12302
Filters: 35
Here are some stripes rainbow lines to see what how is the distorsion done

Here are vertical stripes

  Details E-Mail
SpaceRay
SpaceRay

Posts: 12302
Filters: 35
And this are horizontal stripes

  Details E-Mail
SpaceRay
SpaceRay

Posts: 12302
Filters: 35
And here are another kind of vertical stripes

  Details E-Mail
SpaceRay
SpaceRay

Posts: 12302
Filters: 35
And what happens if you want to make a big Niagara style waterfall from a city skyline?, well here is one example of an aerial syline of New York converted with this filter into a waterfall smile:D

  Details E-Mail
SpaceRay
SpaceRay

Posts: 12302
Filters: 35
And another example of circle to linear conversion

THIS AND ALL THE ABOVE EXAMPLES HAS BEEN DONE USING THE SETTING 2 ON THE SLIDER

  Details E-Mail
Morgantao
Can't script

Posts: 2185
Filters: 20
I know how to use this inside a filter, but my problem is when I go from cartasian to polar, lines get wider and wider as they move further away from the center.
I need to figure out a way to distort thing BEFORE they enter the cartasian to polar... And other stuff after that smile:D
  Details E-Mail
SpaceRay
SpaceRay

Posts: 12302
Filters: 35
Quote
Morgantao wrote:
when I go from cartasian to polar, lines get wider and wider as they move further away from the center


Perhaps this happens because the lines are running away from the cold of the polar smile:D they like better the cartesian warmer place smile:D
  Details E-Mail
SpaceRay
SpaceRay

Posts: 12302
Filters: 35
I also wanted to see what happens when you transform a Polar (bear smile:D ) to cartesian



  Details E-Mail
Nebukadnezar
Posts: 64
Filters: 1
Hahaha! smile:D


Well, kinda hate to call you out on this, but that clearly would have been a better picture for my "polar to carpathian" filter:

  Details E-Mail
Nebukadnezar
Posts: 64
Filters: 1
As for your other examples, they surely look nice and I won't stop you, but there are other filters around that can do that with more options available.

The intended purpose of this filter is really just the single case, where you already have a radial image and want to apply an horizontal or vertical effect. (Better vertical, since the proportions get distorted horizontally, as Morgantao points out. But you are free to toy around with it, of course, and use it to your advantage. Adding a horizontal skew for example will add a spiraling effect, like SpaceRays example for posts above this shows, if you read it from right to left.)
If you then put the image with the parallel effect back to polar coordinates, you will have a radial effect. Which will necessarily taper, since what was the whole width of the image will converge to a single point. If you want evenly thick edges you could perhaps apply an edge detection or high pass on filled forms.

So obviously that transformation should happen as lossless as possible, without loosing any part of the image. In fact I suspect FF will not touch the parts of the image that weren't changed during the conversion at all, because it figures out that the transformations of the conversion cancel each other out.


@Morgantao: There is actually a filter by ThreeDee in the library, called "Radial Spokes". It might do what you are looking for. Basically what it does is taking a spoke at the vertical center of the image, how it is supposed to look later, transforms that to cartesian and gets the distorted shape you are looking for.
  Details E-Mail
Morgantao
Can't script

Posts: 2185
Filters: 20
Nebukadnezar, Thanks for the tip on ThreeDee's snippet, but it's WAY to complex for me to make it work for what I want it to do.
Maybe one day when brain transplant is possible, I'll get me one that could understand this.
  Details E-Mail
Nebukadnezar
Posts: 64
Filters: 1
I guess they had no Lookup back then or free/radial gradients, so a lot of that can be simplified.
Just feed your single spoke into the leftmost Lookup of my Snippet, tile/offset that to the number you require and put it into the right Lookup. Be aware that it will be cropped a bit, though.
  Details E-Mail
Morgantao
Can't script

Posts: 2185
Filters: 20
OK, that works much better smile:)
  Details E-Mail
Burt
Random Old Guy
Posts: 333
Filters: 12
Cool snippet, not sure where I'll use it yet but thanks.
  Details E-Mail

Join Our Community!

Filter Forge has a thriving, vibrant, knowledgeable user community. Feel free to join us and have fun!

33,720 Registered Users
+8 new in 7 days!

153,546 Posts
+12 new in 7 days!

15,348 Topics
+70 new in year!

Create an Account

Online Users Last minute:

24 unregistered users.